Skip to main content

I am reading a feature class stored in ArcGIS Enterprise database and I would like to output a json file.

 

However, I need the datetime fields values to be in epoch time (with milliseconds) not in FME datetime format.

 

I am using the DateTimeConverter transformer with the %s Output format parameter

 

For instance I need this translation

 

2021020511442300 ---> 1612543463000

 

However the transformer return the following error:

DateTimeConverter: Failed to evaluate expression '@DateTimeFormat(20210127152551,%s)'. Result is set to null

Format flag '%s' is not supported for input type 'datetime'. Please check @DateTimeFormat() documentation in https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/Date-Time-Functions.htm in the subsections 'Arguments' and 'Format String Flags', for supported flags and exclusion lists

 

 

 

@bgeorges​  You need decimal seconds. Your input date string:

2021020511442300

has 00 as decimal seconds but no decimal point. Either strip the trailing 00 with StringReplacer, or slip in a DateTimeConverter with a format string %Y%m%d%H%M%S00


Reply