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-1606:51:30| 0.3| 0.0|WARN |Python Exception <NameError>: global name 'NewTime'isnot defined
2018-02-1606:51:30| 0.3| 0.0|WARN |Traceback (most recent call last):
File "<string>", line 15, in input
NameError: global name 'NewTime'isnot defined
2018-02-1606: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-1606:51:30| 0.3| 0.0|WARN |Python Exception <NameError>: global name 'NewTime'isnot defined
2018-02-1606:51:30| 0.3| 0.0|WARN |Traceback (most recent call last):
File "<string>", line 15, in input
NameError: global name 'NewTime'isnot defined
2018-02-1606: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"
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.