Skip to main content
Solved

Test a date field?

  • June 25, 2013
  • 3 replies
  • 458 views

divil
Contributor
Forum|alt.badge.img
Hi,

 

I'm using FME workbench 2013. I want to test based on a date field to filter out just those records that were entered into the database after a specifc date, how can I do this? I used a date formater to get the date in the format I want and then tried using a tester  > 13/09/2006, but that does not work. Any ideas?

 

Helen

Best answer by takashi

HI Helen,

 

 

In the workflow, a date is treated as just a character string. I think if you format the date string into 'YYYYmmdd' form (8 digits), then all is going well.

 

For example, 20060913 < 20130625 is true.

 

 

Takashi
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.

3 replies

takashi
Celebrity
  • Best Answer
  • June 25, 2013
HI Helen,

 

 

In the workflow, a date is treated as just a character string. I think if you format the date string into 'YYYYmmdd' form (8 digits), then all is going well.

 

For example, 20060913 < 20130625 is true.

 

 

Takashi

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • June 25, 2013
Hi,

 

 

I would query the database to return only features created after the date.

 

 

Itay

takashi
Celebrity
  • June 26, 2013
Yeah, querying might be more efficient than filtering by a Tester. As supplementation to Itay's suggestion: for querying to a database, you can use the SQLCreator or the SQLExecutor transformer. Alternatively, specifying the "WHERE Clause" parameter of the reader also can be available to get the same result as an SQL statement with a where clause.

 

 

Takashi