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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Peony
Creator III
Creator III

How to get a month number

Hello. Trying to get month number from field values like this one:

SomeDate:

LOAD * INLINE [

SomeDate

Oct 2017

Sep 2017

Aug 2017

Jun 2017

Oct 2016

Sep 2016

Aug 2016

Jun 2016

];

I'm getting month name like =mid(SomeDate,1,3). But how to covert the result in month number?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=Num(Month(Date#(mid(SomeDate,1,3),'MMM')))

View solution in original post

4 Replies
swuehl
MVP
MVP

Try

=Num(Month(Date#(mid(SomeDate,1,3),'MMM')))

sunny_talwar

May be try this

Num(Month(Date#(SomeDate, 'MMM YYYY'))) AS MonthNum

Peony
Creator III
Creator III
Author

Wow! So fast hepl! Thank you, it works!

Peony
Creator III
Creator III
Author

Thank you. It is quite right idea.