Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to generate Month Names

I want Monthnames to show only Jan, Feb etc....Its showing Jan 2011, Feb 2011 as of now as shown in the image below.

Month listbox.PNG

This is my current script below:

let start = floor(date(AddMonths('2013-12-31',-35)));

let end = floor(date('2013-12-31'));

let numofdays = end - start+1;

Time_table:

LOAD

Distinct

AutoNumberHash128(MonthName(date($(start)+ RowNo() -1))) as Month_Seq,

This is my current script. Thanks

MonthName(date($(start)+ RowNo() -1)) as Month_name,

YearName(date($(start)+ RowNo() -1)) as Year,

date($(start)+ RowNo() -1)as Date

AutoGenerate $(numofdays);

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try using the Month() function instead of MonthName()

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Try using the Month() function instead of MonthName()

Anonymous
Not applicable
Author

Thanks Bill.

here is the correct complete syntax:

1) Month(date($(start)+ RowNo() -1)) as Month,

2) Monthname(date($(start)+ RowNo() -1)) as Month_name,

1) will display Jan and 2 will Jan 2011.

its_anandrjs

Yes you are right see this also

let start = floor(date(AddMonths('2013-12-31',-35)));
let end = floor(date('2013-12-31'));
let numofdays = end - start+1;

LOAD
Distinct
AutoNumberHash128(MonthName(date($(start)+ RowNo() -1))) as Month_Seq,
MonthName(date($(start)+ RowNo() -1)) as Month_name,
Month(date($(start)+ RowNo() -1)) as Months,
YearName(date($(start)+ RowNo() -1)) as Year,
date($(start)+ RowNo() -1)as Date
AutoGenerate $(numofdays);

Regards

Anand