Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello everyone,
how can i handle this type of date format,
i want to split it on 3 files like
26 Dec 1955 ---> dd MMM yyyy -->||File 1
1944--> yyyy -->||File 2
Circa 1996 ---> file 3
the original data is same as like this:-
Date Of Birth
26 Dec 1955
26 Dec 1955
26 Dec 1955
26 Dec 1955
1944
1945
1955
Circa 1996
Circa 1996
Circa 1996
Circa 1996
Circa 1996
This means your data is null. You will have to handle nulls as well. Add something like....
row.Column!=null ? {your processing code} : {your response if the column is null}
An easy way would be to use a tMap with 3 outputs (Circa_out, Year_out and Date_out). If the String value containing the date is 4 characters long, it must be the Date_out. If the String contains "Circa" it is the Circa_out. Otherwise it is the Date_out. You can use the output filters in the tMap to calculate this.
thanks sir, it works, but in "circa" filter is not working,
what can i do in find "circa 1955" values?
You can use something like....
row.Column.toUpperCase().indexOf("CIRCA")>-1
.....to solve this
It's not working, gives some error "Exception in component tMap_2 (date_function2)
java.lang.NullPointerException"
This means your data is null. You will have to handle nulls as well. Add something like....
row.Column!=null ? {your processing code} : {your response if the column is null}