Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How to convert a month name to a month number on the fly

Can someone shed some light on converting a month name to a month number on the fly? (January = 1)

Henry suggested the reverse conversion on a thread from month number to month name: Month(MakeDate(2012,MonthNo))

Thanks,

Xinzhen

1 Solution

Accepted Solutions
Highlighted

If MonthName is read as a true date field then simply doing Num(MonthField) should give you the Month Number. If MonthName is read as a text, you can try this:

Num(Month(Date#(MonthName, 'MMMM')))

View solution in original post

2 Replies
Highlighted

If MonthName is read as a true date field then simply doing Num(MonthField) should give you the Month Number. If MonthName is read as a text, you can try this:

Num(Month(Date#(MonthName, 'MMMM')))

View solution in original post

Highlighted
Not applicable

Thank you Sunny. That worked!

Xinzhen