Hello, I have an Timestamp attribute in UTC time (e.g. 20180311013252.000). I would like to create a new attribute converting the UTC Timestamp to EST/EDT Time. After that both attributes should be transformed to %Y%m%d. In this example the output should be 20180311 for UTC and 20180310 for EDT/EST.
Solved
Timezone
Best answer by takashi
Hi @kat, if you are using FME 2017.1+, you can use the @TimeZoneSet function to convert timezone of a datetime value. e.g.
@TimeZoneSet(@Value(_utc_datetime)+00:00,-04:00)
You can then format the datetime values with the DateTimeConverter transformer.
The @DateTimeFormat function can also be used instead of the DateTimeConverter transformer.
@DateTimeFormat(@TimeZoneSet(@Value(_utc_datetime)+00:00,-04:00),%Y%m%d)
See also here to learn more about FME Date/Time functions.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.