Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What does SET DateFormat='M/D/YYYY'; in the data load editor script do?

I see that there is SET DateFormat='M/D/YYYY'; line the data load editor script -- I am curious to learn what it does? I had a hypothesis that it formats all fields (from the load section) with "date" datatype to M/D/YYYY format. But that doesn't seem to be true.

Thanks in advance for your help.

1 Solution

Accepted Solutions
sunny_talwar

Not sure how the SQL works, but may be do this and see if it helps:

LOAD Date(mydate) as mydate;

Select cast('10/16/2016' as date) "mydate";

View solution in original post

3 Replies
sunny_talwar

It defaults the format used when you use Date() function. and if you data source has the same format as the one you set up top, QlikView will be able to recognize it as date and bring it as a date field instead of text.

Not applicable
Author

Thanks for the reply. So I tested it using a SQL command in the data load editor:

select cast('10/16/2016' as date) "mydate";

Note that the datatype is "date"...but the app is not picking the format M/D/YYYY:

Not picking up the date format.PNG

Any ideas?

sunny_talwar

Not sure how the SQL works, but may be do this and see if it helps:

LOAD Date(mydate) as mydate;

Select cast('10/16/2016' as date) "mydate";