Qlik Community

Qlik Sense App Development

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

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

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

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')))

2 Replies

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

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')))

Not applicable

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

Thank you Sunny. That worked!

Xinzhen

Community Browser