Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

System Variables

Hello

This may be a very stupid question, but can somebody tell me how i use the 'Number interpretation variables'.

On load i am setting a system variable call 'LongMonthNames'. If i have a date '02/06/2012' how can i use 'LongMonthNames' to return June.

I have attached a file with Months 1 to 12 so you can see what i mean.

LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

Cheers

Robbie

1 Solution

Accepted Solutions
Not applicable
Author

Robbie,

All the functions seem to use the format as defiend in MonthNames eg if you change your script to:

load Month,

month(Month) as monthname;

LOAD * INLINE [

    Month

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

];

It will return 'Jan' 'Feb' etc. The LongMonthNames only seems to have a value when formatting a date (MMM returns eg 'Jan' whereas 'MMMM' returns 'January'.

Easiest way I know is to just change the definition of MonthNames:

SET MonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

Regards,

Gordon

View solution in original post

3 Replies
Not applicable
Author

Robbie,

All the functions seem to use the format as defiend in MonthNames eg if you change your script to:

load Month,

month(Month) as monthname;

LOAD * INLINE [

    Month

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

];

It will return 'Jan' 'Feb' etc. The LongMonthNames only seems to have a value when formatting a date (MMM returns eg 'Jan' whereas 'MMMM' returns 'January'.

Easiest way I know is to just change the definition of MonthNames:

SET MonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

Regards,

Gordon

stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi Robbie,

The values will be used in the Date format function when you use MMMM:

Load Dual(Text(Date(MakeDate(2012, Month), 'MMMM')), Month) As Month;

LOAD * INLINE [

    Month

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

];

Regards,

Stephen

Anonymous
Not applicable
Author

Thanks guys, that makes sense now!!