Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mathieme
Partner - Contributor
Partner - Contributor

Date interpretation

Hi,

I'm having trouble with values in a non-date field wrongfully being interpreted as dates when loaded into Qlik. The problem is easily solved by using the text() function but, nevertheless, is has raised the question why a given value is interpreted as a date or not since it seems to occur randomly in my data set. In addition, in some cases Qlik converts the values from date format to its numeric representation, and in other cases it's the other way around. See example below:

1st row: Value is converted from "date" format to numeric representation
2nd row: Value is converted from numeric representation to date format.
3rd and 4th row: no convertion is made. 

clipboard_image_0.png

It is the inconsistency that bothers me.

 

Thank you,

Marcus

Labels (2)
2 Replies
jerifortune
Creator III
Creator III

Try this

IF (FindOneOf([Data Source Date],'-') <> 0, Date([Data Source Date]),

Date(Left( [Data Source Date], Index([Data Source Date],'-') -1 ) & '-'& MID([Data Source Date],Index([Data Source Date],'-',-1)-2,2) &'-'&MID([Data Source Date],Index([Data Source Date],'-',-1)+1))

)