Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

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

Try

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

View solution in original post

4 Replies
MVP
MVP

Try

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

View solution in original post

May be try this

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

Creator II
Creator II

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

Creator II
Creator II

Thank you. It is quite right idea.