In 2017, I would use dates like 'today', 'last month', etc in the DateFormater to create dates in FME and other formats. The new DateTimeConverter no longer recognizes natural language dates. Was this an oversight?
FME 2018 natural language dates no longer accepted
Best answer by takashi
Hi @sdingman, unfortunately the functionality (to convert a natural date representation to date/time value) seems to have retired in the current DateTimeFormatter. However, the functionality in the previous DateFormatter was originally from Tcl, so you can still call that with the TclCaller.
Assuming that an attribute called "_date" stores a natural date representation such as "last month", for example, this Tcl expression returns the number of seconds since the Unix epoch 1970-01-01T00:00:00Z corresponding to the date (00:00:00 local time),
clock scan [FME_GetAttribute "_date"]
and this expression returns the value formatted with a specified date/time format, e.g. "%Y%m%d".
clock format [clock scan [FME_GetAttribute "_date"]] -format "%Y%m%d"
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.