Skip to main content

I have an incoming string attribute e.g. 20220322100000 which I need to convert to milliseconds after epoch for writing to an ESRI Portal Feature Service.

 

I can't seem to work around this output format error below in Desktop 2021.2?

`Failed to evaluate expression '@DateTimeFormat(20220322100000,%s)'. Result is set to null'

image

Use %Es instead of %s

If you follow the link on the warning in the transformer - https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/Date-Time-Functions.htm it says that %s is not supported for converting an unzoned datetime. If your datetime has a timezone, the function to convert to epoch seconds is %s. If your datetime doesn't have a timezone, the function is %Es.

 


Reply