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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I create a date from JAN2013

My date file that  am importing has the Date as JAN2013 how do I make a date from that?

1 Solution

Accepted Solutions
miguelbraga
Partner - Specialist III
Partner - Specialist III

Even try this as multiple date formats because you refered first as JAN2013, then Jan12 or Jan-12:

Alt(

     Date((Date#(Date, 'MMM-YY')), 'DD/MM/YYYY'),            // for case Date comes with Jan-12

     Date((Date#(Date, 'MMMYY')), 'DD/MM/YYYY'),             // for case Date comes with Jan12

     Date((Date#(Date, 'MMMYYYY')), 'DD/MM/YYYY'),         // for case Date comes with JAN2013

      'Invalid Format'                                                            // If date comes with an invalid format

) as Date

Regards,

MB

View solution in original post

12 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Like this:

=Date((Date#('JAN2013', 'MMMYYYY'), 'YYYY-MM-DD')

The result looks like that:

Screenshot_3.png

sunny_talwar

Or may be this:

Date(MakeDate(Right(Date,4), Left(Date, 3), 1)) as Date

Replace 1 with whatever date you want to create.

Anil_Babu_Samineni

What are you expecting

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

I am attempting to be able to use a Max Date variable to use in set analysis, and be able to run things like year to date nut just can't get it to work. My Qv skills are a bit rusty

sunny_talwar

Did you get it to work, or are you still trying to figure this out?

MarcoWedel

LOAD *,

          Month(MonthYear) as Month,

          Year(MonthYear) as Year;

LOAD Date#(YourDate,'MMMYYYY') as MonthYear

From YourSource;

hope this helps

regards

Marco

Not applicable
Author

Still trying to get it to work ......

sasikanth
Master
Master

HI,

It depends on the granularity level of your data ,check weather it is month level or day level.

please do share a sample of your data.

Not applicable
Author

Data is at Month level, I have attached a small sample set below

 

   

Value
Store AProduct CatJan1260859
Feb1252132
Mar1256551
Apr1259750
May1258010
Jun1255000
Jul1257081
Aug1256238
Sep1256196
Oct1258242
Nov1257266
Dec1273807
Jan1367466
Feb1359402
Mar1375607
Apr1364579
May1362954
Jun1368829
Jul1358097
Aug1358301
Sep1359175
Oct1363455
Nov1364180
Dec13105383
Jan1488205
Feb1478795
Mar1496060
Apr14108033
May14148180
Jun14103311
Jul14116351
Aug14106459
Sep14100022
Oct1494334
Nov1493256
Dec14158555
Jan1585170
Feb1574543
Mar1584702
Apr1589426
May1587764
Jun1583988
Jul1573914
Aug1566165
Sep1565115
Oct1568060
Nov1569751
Dec1585937
Jan1664784
Feb1657578
Mar1667451
Apr1678640