Skip to main content
Question

I would like to pass date/time user parameter (Date Ranges) to a SQL-Non Spatial reader where clause

  • June 20, 2019
  • 1 reply
  • 60 views

keitho
Contributor
Forum|alt.badge.img+3

Hello,

I would like to pass date/time user parameter (Date Ranges) to a SQL-Non Spatial reader where clause. I have tried the following with no success.

[wo_complete_dt]>= {ts $(DateRangeStart)} AND [wo_complete_dt]< {ts $(DateRangeEnd)}

[wo_complete_dt]>= {ts ‘$(DateRangeStart)’} AND [wo_complete_dt]< {ts ‘$(DateRangeEnd)’}

[wo_complete_dt]>= '$(DateRangeStart)' AND [wo_complete_dt]<'$(DateRangeEnd)'

[wo_complete_dt]>= $(DateRangeStart) AND [wo_complete_dt]< $(DateRangeEnd)

However, if I change the user parameter to a text type or input the dates directly into the Where clause as shown here it does work.

[wo_complete_dt]>={ts '2019-06-09 00:00:00'} AND [wo_complete_dt]<{ts '2019-06-16 00:00:00'}

 

Can someone please guide me?

Using FME Desktop 2019.

Thanks in advance,

Keith

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • June 21, 2019

The date/time user parameter stores the date in FME format, i.e. 20190609000000, although it is displayed as 2019-06-09 00:00:00

You will need to convert the date to the format you need for your sql statement. This can be done in the statement itself.