Skip to main content

I have a SQL Server table that holds log information. It contains a date field. If I query it in SQL no problem I get: imageIn FME I have a FeatureWriter. I have it set to Update and Use Existing and I've chosen Where Clause as my row selection method. I thought it would be easy to select all rows having todays date, but I'm 3 hours in and having zero luck.

I've tried all sorts of iterations like these and many, many more and every time I get "date is incompatible with some data type" or it finishes successfully and I get zero matches. imageAny suggestion would we GREATLY appreciated.

Kim

Of course right after I post I find the answer:

 

"RunDate" = @DateTimeFormat(@DateTimeNow(),'%Y-%m-%d')

 

My dates in SQL were formatted no time and YYYY-MM-DD.

 

I'm guess it's so hard because their are so many possible date variations in terms of formatting, date/time, time zone, etc. and you are going between FME standard date format and whatever format your using in SQL (or whatever database you are using).

 

 

 


Reply