Skip to main content

@takashi

Hi I have a DESIGN_DATETIME field in SQL Server and an example of its value is 23/06/2019 11:21:01

I am trying to use TestFilter to return only records with timestample in the last 48 hours (i.e. 2 days)

The following doesn't seem to work. I am using FME 2018

DESIGN_DATETIME >= @DateTimeAdd(@DateTimeNow(),-P2D)

Any suggestion?

Firstly make sure that the value of DESIGN_DATETIME is formatted with the FME standard date/time format - i.e. %Y%m%d%H%M%S.


There was a recent question that I answered and it should help you. Basically convert the date (DateTimeFormatter) and use the DateTimeCalculator to subtract 48 hours from now (@DateTimeNow). Test if the result is more or less than zero to filter your data.