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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date value in inline statement

I don't know how to pass a date value in inline statement like:

T1:

LOAD * INLINE [

    Col1, Col2

    124, '30/12/1996'

];

QlikView treats this column as string and not date-time data type. Can you please help?

Thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

Try this

SET DateFormat='DD/MM/YYYY';

T1:

LOAD Col1 , Date(Col2) as Date , Month( Col2) as Month

INLINE [

    Col1, Col2

    124, '30/12/1996'

];

JJ

View solution in original post

3 Replies
Not applicable
Author

Try this

SET DateFormat='DD/MM/YYYY';

T1:

LOAD Col1 , Date(Col2) as Date , Month( Col2) as Month

INLINE [

    Col1, Col2

    124, '30/12/1996'

];

JJ

nagaiank
Specialist III
Specialist III

Try the following with no single quotes for the date value:

T1:

LOAD * INLINE [

    Col1, Col2

    124, 30/12/1996

];

Anonymous
Not applicable
Author

Thanks!! Did not use inline date before, I am doing a test, but the date can not be recognized when I am using format "MM/DD/YYYY", search most topic about this issue, surprisingly, only yours make the point, that is because the default DateFormat. And yes,  it works without quote. Thanks very much.

Zhihong