Solved

Change /Date()/ to DateTime

  • 13 February 2020
  • 1 reply
  • 0 views

Hello there,

I try to read from a web service and write in Database but Datetime value from service came as string like /Date(1578560957763)/ . How can I change these string to actual datetime.

I use FME(R) 2019.2.2.0 (20200103 - Build 19817 - WIN64)

Thanks in advance.

icon

Best answer by ebygomm 13 February 2020, 16:54

View original

1 reply

Userlevel 1
Badge +10

Extract the value (based on your example you could use a stringsearcher with regex (?<=Date\\()\\d+\\.?\\d* ) to get this) divide it by 1000 (to get seconds from milliseconds) and use a dateformatter with input format %s

Reply