Solved

How to convert string to date format in FME?

  • 5 January 2023
  • 4 replies
  • 13 views

Happy New Year all.

 

Can anyone please how can I change a date column (dd/mm/yyyy) from string to date time format within a workbench. The column is originally coming from a CSV file but after reading in FME, its getting converted into string. I want to apply test filter to get values within a certain date period but because the date is in string, I cannot do it. Do you have any idea how to resolve the issue? Thanks in advance.

icon

Best answer by geomancer 5 January 2023, 07:43

View original

4 replies

Userlevel 3
Badge +33

Take a look at the DateTimeConverter.

DateTimeConverter

Badge +10

You can also parse the string to a date within an AttributeCreator/AttributeManager

@DateTimeParse(@Value(date),%d/%m/%Y)

 

Take a look at the DateTimeConverter.

DateTimeConverter

Thank you @geomancer​ . I later avoided the problem by converting CSV to Excel from the source. And in ExcelReader, the field does not change interestingly.

You can also parse the string to a date within an AttributeCreator/AttributeManager

@DateTimeParse(@Value(date),%d/%m/%Y)

 

Thank you @ebygomm​ :) 

Reply