Date Formatting Conditioning

More
4 years 7 months ago #18971 by bruce.gibbins
Looking for a concise and clean way of doing this (AETL v6.3.4.4 x64)

Inbound CSV file has some dates in one of three formats

1) NULL
2) MM/DD/YYYY HH:NN:SS
3) M/DD/YYYY H:NN:SS

Writer will need to cleanup to

1) NULL
2) DD/MM/YYYY HH:NN:SS

Meaning that if it comes in as NULL then goes out as NULL, if one of the other formats occurs then it is formatted to DD/MM/YYYY HH:NN:SS all other cases should result in an error of some sort.

But what I have noticed is that if the Inbound Date field is NULL (or Empty) the DateFormatter treats the date as start of the Epoch and overrides the initial NULL value.

Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #18973 by Peter.Jonson
Hello

I have run some tests and noticed when the data is null it works correctly but when it has spaces only it returns 1899-ETC
Please put trim function before the date format.


Peter Jonson
ETL Developer
Attachments:
The following user(s) said Thank You: bruce.gibbins

Please Log in or Create an account to join the conversation.