Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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?

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

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

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.