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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
gshockxcc
Creator
Creator

Problem loading dates

I am having a problem loading dates.  The Date format that I have in my data is 'MMM DD YY'.  For example, "Dec 01 15"

I can use subfield() to get the date and year, which seems to be working fine.  But I am not able to get the month to be recognized as a Month so that I can format "Dec" as "12".

I found a related post for data formatting, but I don't understand why I have to do it this way.

Shouldn't I be able to format my data better during the load script?

Labels (1)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, certainly.

In your load script, use the function date# to convert your string to the proper Date field:

date#(Date, 'MMM DD YY') as ProperDate,

Then, apply the desired Date format to also format the new field any way you want:

date(date#(Date, 'MMM DD YY')) as FormattedDate,

     or

date(date#(Date, 'MMM DD YY'), 'MM/DD/YYYY') as FormattedDate,


cheers,

Oleg Troyansky

Check out my new book QlikView Your Business: An expert guide to Business Discovery with QlikView an...

Ask me about Qlik Sense Expert Class!

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, certainly.

In your load script, use the function date# to convert your string to the proper Date field:

date#(Date, 'MMM DD YY') as ProperDate,

Then, apply the desired Date format to also format the new field any way you want:

date(date#(Date, 'MMM DD YY')) as FormattedDate,

     or

date(date#(Date, 'MMM DD YY'), 'MM/DD/YYYY') as FormattedDate,


cheers,

Oleg Troyansky

Check out my new book QlikView Your Business: An expert guide to Business Discovery with QlikView an...

Ask me about Qlik Sense Expert Class!
gshockxcc
Creator
Creator
Author

Thanks, Oleg.  I realize now that I was using the Date( ) format incorrectly.  I was giving an input of the data format that I wanted, rather than the format of my data.  Everything is working as it should.

Thanks.