Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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
Creator

Converting a variable name to Month number

I have a variable (vMonthNum) that I access through an input box. I have a constraint on it to show listed values referencing a Month field (Jan, Feb, Mar, etc)

I want to convert the selection the user makes (Jan, Feb, Mar, etc) to a number that corresponds to the month. So if from the drop down the user selects Mar I need it converted to 3. Looking for the expression to do this.

Thanks in advance,

Steve

1 Solution

Accepted Solutions

Try this:

vVar2 = Num(Date#(vVar1, 'MMM'))


vVar2 = Num(Month(Date#(vVar1, 'MMM')))

where vVar1 is linked to your inputbox

HTH

Best,

Sunny

View solution in original post

4 Replies

Try this:

vVar2 = Num(Date#(vVar1, 'MMM'))


vVar2 = Num(Month(Date#(vVar1, 'MMM')))

where vVar1 is linked to your inputbox

HTH

Best,

Sunny

View solution in original post

Attaching a sample:

Creator
Creator

Thank so much!

No problem

I am glad I was able to help.

Best,

Sunny