Skip to main content
I have a few tables that I am converting from Oracle Spatial to Google Maps Engine (GME) tables. There is a field, called "DISCONTINUEDATE", which has the end dates for certain projects. Rather than delete the records whose DISCONTINUEDATE's are prior to today, I'd like to omit them from the data being published with GME.

 

 

So far I'm using the TimeStamper transformer to create a "SYSDATE" field with today's date. I'm having trouble using a Tester to compare the new value with DISCONTINUEDATE in order to omit certain records. The SYSDATE field is created as a String value so I can't figure out how to compare the two. Ideally, I would like all records with a DISCONTINUEDATE "<" SYSDATE omitted but I'm not sure how to do this.

 

 

Anyone had success doing this before?
Hi,

 

Have you tried formatting the date(s) with the DateFormatter or DateConverter?
Yes, or for full control you can use tcl date

 

 

@Evaluate(eclock format tclock scan "@Value(DISCONTINUEDATE)"] -format "%Y%m%d"]) - @Evaluate(eclock scan "@Value(SYSDATE)"])

 

 

Format as your needs dictate of course..

 

 

 

see

 

 

http://www.tcl.tk/man/tcl8.4/TclCmd/clock.htm
That piece was from a workspace...

 

to substract them should be without the formatting..:

 

=@Evaluate(eclock scan "@Value(DISCONTINUEDATE)"]) - @Evaluate(eclock scan "@Value(SYSDATE)"])

 

You can insert the string in a tester and test for regexp <0 like this

 

 


Reply