Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change a num 1-12 into short month name (Jan-Dec).

Hello all,

I have a small problem to convert a list of numbers into short month names, the question is as follows:

can we convert a the list of numbers from 1 to 12 in short month names such Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov, and Dec in qlikview.

Thanks in advance.

Rajiv

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You probably already have variable MonthNames defined (check out Number Interpretion Variables in Help), so you could also retrieve the short names by using (in script or forntend)

subfield('$(MonthNames)',';',MonthID)

where MonthID needs to be replaced by your field that holds the numbers 1-12 or literals.

View solution in original post

4 Replies
SunilChauhan
Champion
Champion

Load * inline [

Month,MonthNo

Jan,1

Feb,2

Mar,3

Apr,4

May,5

Jun,6

Jul,7

Aug,8

Sep,9

Oct,10

Nov,11

Dec,12

];

link MonthNo with your Monthnumber

hope this helps

Sunil Chauhan
jagannalla
Partner - Specialist III
Partner - Specialist III

Map1:

Mapping

LOAD * INLINE [

    Mno, MName

    1, Jan

    2, Feb

    3, Mar

    4, Apr

    5, May

    6, Jun

    7, Jul

    8, Aug

    9, Sep

    10, Oct

    11, Nov

    12, Dec

];

LOAD *,

ApplyMap('Map1',Month(DateField)*1) as MonthName

From

Table;

Hope it helps you...

swuehl
MVP
MVP

You probably already have variable MonthNames defined (check out Number Interpretion Variables in Help), so you could also retrieve the short names by using (in script or forntend)

subfield('$(MonthNames)',';',MonthID)

where MonthID needs to be replaced by your field that holds the numbers 1-12 or literals.

Not applicable
Author

Hello everyone,

the applyMap works. However swuehl, your suggestion about subfield is indeed more helpful as i do have the variable MonthNames defined. So no need to do a load inline etc to apply map..

thanks mate..

Rajiv