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
  • 44 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

1 reply

ebygomm
Influencer
Forum|alt.badge.img+31
  • 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.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings