Skip to main content
Question

DateTimeConverter problem

  • April 4, 2019
  • 6 replies
  • 258 views

Forum|alt.badge.img

A csv file has 4 fields containing date time data. Those fields starts with Datum in their name.

I want to convert the date to another format using the date time converter.

With the date time converter you can select muliple fields that you want to convert. That is not working in my workspace. If i select them seperatly (one by one) there's no problem. If i select 4 fields then i have wrong results.

Does someone know what's wrong?

 

test_datetimeconverter.fmw

CSV.csv

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • April 4, 2019

Your workspace hasn't uploaded correctly. What input format are you using? Do you have passthrough nulls, empties, or missing set to No? If this is set to No, anything that has no date attribute in any one of the four datum fields will pass out the rejected port.


Forum|alt.badge.img+2
  • 719 replies
  • April 4, 2019

Hi @kees_v,

The reason the features are being returned through the rejected port is because as @egomm was hinting at each row has at least one of these attributes passing through an empty value. Since the expected input is %N/%e/%Y all the empty fields are marked as invalid and a <null> value is returned. In your case there is at least one of 'invalid' attribute in every feature so your entire data set comes out through the rejected port. However if you have a look at the features which do contain valid date attributes you can see these have been correctly converted.

@egomm just as a side note if you ever get an error opening a workspace you can right click >save link as and this should then download the .fmw correctly :)


Forum|alt.badge.img
  • Author
  • 18 replies
  • April 4, 2019

Hi @kees_v,

The reason the features are being returned through the rejected port is because as @egomm was hinting at each row has at least one of these attributes passing through an empty value. Since the expected input is %N/%e/%Y all the empty fields are marked as invalid and a <null> value is returned. In your case there is at least one of 'invalid' attribute in every feature so your entire data set comes out through the rejected port. However if you have a look at the features which do contain valid date attributes you can see these have been correctly converted.

@egomm just as a side note if you ever get an error opening a workspace you can right click >save link as and this should then download the .fmw correctly :)

What do you suggest; dummy values?


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • April 4, 2019

What do you suggest; dummy values?

Set "passthrough nulls, empties, or missing" to Yes in the DateTimeConverter


Forum|alt.badge.img
  • Author
  • 18 replies
  • April 4, 2019

Set "passthrough nulls, empties, or missing" to Yes in the DateTimeConverter

I don't see that option in FME 2018 (see screenshot)no_passthrough.JPGno_passthrough_2.JPG


Forum|alt.badge.img
  • Author
  • 18 replies
  • April 4, 2019

I don't see that option in FME 2018 (see screenshot)no_passthrough.JPGno_passthrough_2.JPG

I found another datetimeconverter (upgrade maybee?), the option is now available. It works!!!!!!!

Thank you very much.