Skip to main content
Question

Convert Date in format 2023-09-13(YYYY-MM-DD) to Timestamp in milliseconds

  • September 13, 2023
  • 2 replies
  • 92 views

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

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

One way to solve this is to add the time before the DateTimeConverter using an AttributeCreator.

@Value(Date00:00:00.000

 Then feed it to the DateTimeConverter using

%Y-%m-%d %H:%M:%S$

as input format and

%Es

as output format.

 


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 13, 2023

You can convert to ISO date to seconds using input format of %Y-%m-%d$ and output format of %Es

imageThen multiply the result by 1000 to get milliseconds


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings