Date Reformat

Hi

I was wondering if it was possible for you to tell me how to implement JAVA code or other method to convert dates in Clover ETL.
They are currently stored as string data type.

Example:

I want to convert to format 06-Jul-37.

Dates are currently in format:

12/07/1939
1938 January 26
February 9 1998

Also missing whole date where I want to set to NULLS

26-Jul
6 1982

Thanks,

Hello,

You can convert your strings to date and then back to string in another format. Something like:

$out.0.my_date = date2str(str2date("01/01/1970", "dd/MM/yyyy"), "dd-MMM-yy");

And what exactly do you mean by the second question? Would you like to replace any incomplete date with NULL value? If so, I recommend parsing the string and testing whether it contains everything necessary (using common if conditions).

Kind regards,