Question

DateTimeConverter problem

  • 4 April 2019
  • 6 replies
  • 44 views

Badge

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

Userlevel 1
Badge +21

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.

Badge +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 :)

Badge

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?

Userlevel 1
Badge +21

What do you suggest; dummy values?

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

Badge

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

Badge

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.

Reply