We want to convert Date in format 2023-09-13(YYYY-MM-DD) to Timestamp in milliseconds 1694563200000 using FME Transformer but no FME transformer is able to convert date to milliseconds.
For example 2023-09-13 -> 1694563200000
We want to convert Date in format 2023-09-13(YYYY-MM-DD) to Timestamp in milliseconds 1694563200000 using FME Transformer but no FME transformer is able to convert date to milliseconds.
For example 2023-09-13 -> 1694563200000
One way to solve this is to add the time before the DateTimeConverter using an AttributeCreator.
@Value(Date) 00:00:00.000
Then feed it to the DateTimeConverter using
%Y-%m-%d %H:%M:%S$
as input format and
%Es
as output format.
You can convert to ISO date to seconds using input format of %Y-%m-%d$ and output format of %Es
Then multiply the result by 1000 to get milliseconds