Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Scenario how can handle this

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

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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}

View solution in original post

5 Replies
Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

thanks sir, it works, but in "circa" filter is not working, 

what can i do in find "circa 1955" values? 

Anonymous
Not applicable
Author

You can use something like....

row.Column.toUpperCase().indexOf("CIRCA")>-1

.....to solve this

Anonymous
Not applicable
Author

 

It's not working, gives some error "Exception in component tMap_2 (date_function2)
java.lang.NullPointerException" 

 

Anonymous
Not applicable
Author

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}