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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Date to integer

hi all, can anyone help me on how to convert a date field (MMM-YYYY) to an interger?

Labels (1)
11 Replies
Not applicable

You are writting this:

=num(Date#('Jul-2013', 'DD-MMM-YYYY'))

But it won't work because the formula its expecting the day and you only write jul-2013.

Try writting 01-jul-2013... or =num(Date#('Jul-2013', 'MMM-YYYY'))

MayilVahanan
MVP
MVP

HI

Temp:

LOAD * INLINE [

    Date, Sales

    May-2013, 1000

    Jun-2013, 2000

];

Date:

Load *,

          Num(Date#(Date,'MMM-YYYY')) as DateField

Resident Temp;

 

Drop table Temp;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.