Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Partner
Partner

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

2 Replies
Highlighted
Contributor III

Re: Date interpretation

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))

)

Highlighted
Contributor II

Re: Date interpretation