Skip to main content
Question

DateTimeConverter problem


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

 

 

6 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • 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

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
  • April 4, 2019
hollyatsafe wrote:

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+32
  • Influencer
  • April 4, 2019
kees_v wrote:

What do you suggest; dummy values?

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


Forum|alt.badge.img
  • Author
  • April 4, 2019
ebygomm wrote:

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
  • April 4, 2019
kees_v wrote:

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.


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