Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the Month Number from a Date field


Hi There

I have a date field in the format DDMMMYYYY and in addition to the standard date information that I am extract from that field (i.e. month name, week commencing etc) I want create a field with the month number.

So the date of '01APR2015' should give me 4.

Any help appreciated.

JW

5 Replies
bill_markham

=date(date#( '01APR2015' ,'DDMMMYYYY'),'M')

maxgro
MVP
MVP

=num(month(date#( '01APR2015' ,'DDMMMYYYY')))

Not applicable
Author

Fantastic, thank you!

Not applicable
Author

Brilliant, Thank you

rwunderlich
Luminary Alumni
Luminary Alumni

Bill,

Your solution does not return the month number. It runs the same date with a display format of "M".


=date(date#( '01APR2015' ,'DDMMMYYYY'),'M')

=date(date#( '14APR2015' ,'DDMMMYYYY'),'M')


would create two rows in a listbox or chart which is probably not what the poster wants.


-Rob