Skip to main content
Solved

How to convert string to date format in FME?

  • January 5, 2023
  • 4 replies
  • 1140 views

smfks911

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.

Best answer by geomancer

Take a look at the DateTimeConverter.

DateTimeConverter

View original
Did this help you find an answer to your question?

4 replies

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • Best Answer
  • January 5, 2023

Take a look at the DateTimeConverter.

DateTimeConverter


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • January 5, 2023

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

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

 


smfks911
  • Author
  • January 5, 2023
geomancer wrote:

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.


smfks911
  • Author
  • January 5, 2023
ebygomm wrote:

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

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

 

Thank you @ebygomm​ :) 


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