Skip to main content
Solved

Test a date field?


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
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Influencer
  • 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
Contributor
Forum|alt.badge.img+17
  • Contributor
  • June 25, 2013
Hi,

 

 

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

 

 

Itay

takashi
Influencer
  • 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

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