Be aware: This deliberately and consciously ignores leap seconds.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Alternatively, you can also use the "DateTimeCalculator" custom transformer from FME Hub. It has been deprecated since its name is the same as the regular DateTimeCalculator in FME 2017, but it's still available in FME 2016 and earlier.
Hey @davidrich are you sure this works? When I run this workspace it fails.
2018-02-16 06:51:30| 0.3| 0.0|WARN |Python Exception <NameError>: global name 'NewTime' is not defined 2018-02-16 06:51:30| 0.3| 0.0|WARN |Traceback (most recent call last): File "<string>", line 15, in input NameError: global name 'NewTime' is not defined 2018-02-16 06:51:30| 0.3| 0.0|ERROR |Error encountered while calling method `input' 2018-02-16 06:51:30| 0.3| 0.0|FATAL |f_7(PythonFactory): PythonFactory failed to process feature
Hey @davidrich are you sure this works? When I run this workspace it fails.
2018-02-16 06:51:30| 0.3| 0.0|WARN |Python Exception <NameError>: global name 'NewTime' is not defined 2018-02-16 06:51:30| 0.3| 0.0|WARN |Traceback (most recent call last): File "<string>", line 15, in input NameError: global name 'NewTime' is not defined 2018-02-16 06:51:30| 0.3| 0.0|ERROR |Error encountered while calling method `input' 2018-02-16 06:51:30| 0.3| 0.0|FATAL |f_7(PythonFactory): PythonFactory failed to process feature
Sorry I had renamed a value and didn't change all of them.
No problem, also if you ever want to do more complex string input or output, I use this http://strftime.org/ which is all the different inputs or outputs other than "%Y%m%d%H%M%S" such as "%-I:%M:%S %p %d %B %y" which is "7:06:05 AM 30 September 13"