Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Month function returns month number instead of the month name?

Hello,

I have an expression:

month(addmonths(MakeDate(1900,month(date#((GetFieldSelections([Month])),'MMM')),1),-1))

The Month field is the three-letter month name. What i want is to getthe month name of last month. The expression gives me the correct month number in integer. Shouldn't month()  return a month name?

Please help.

Thank you.

3 Replies
sunny_talwar

I tried this and I got three letter month name:

=month(addmonths(MakeDate(1900,month(date#('Feb', 'MMM')),1),-1))

Capture.PNG

Can you check your environmental variables? Do you have this?

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

or do you have this?

SET MonthNames='1;2;3;4;5;6;7;8;9;10;11;12';

Anonymous
Not applicable
Author

My environmental variables setting is the first one, but i am still getting a number not the real name. Month function works fine if i just use it with a date.

pierre
Contributor
Contributor

Hello,

Have a look at your axes properties. If you have a "continuous" axis in a chart, it will show a number instead of a name