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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show month in different formates

Hi ,

I have November, December, January as months in my data

but my req. is like Nov-13, Dec-13,Jan-14

as months (by default it should like that ), even i don't have year column

I have only month data i.e November, December, January

Is this possible?

Thanks & Regards,

Ankitha

3 Replies
Not applicable
Author

Hi Antikha,

If you don't have a year column in your data, then if you have your input files identified by moths and years (filename) you can obtain this information using this (It will be better that you will use variables for the name of the file and for the date of the input file. Let's say you called your variable vYear for the year of the input files - the File name of the input file will be something like vFileName & vYear & vMonth)). Then you can try something like this:

Table:

LOAD .....,

          Mid([Your Month Filed],1,3) & '-' & vYear  as [New Month Field]

FROM ....;

Hope this helps,

Regards.

Jaime

Not applicable
Author

Hi Ankitha,

You can show month's in 3 different formats (to my knowledge).

1. Number Format - 01, 02, 03.......

2. Short Text        - Jan, Feb, Mar......

3. Long Text         - January, February, March.....

To do this.....follow the steps.

You might be having only one field, Date or Year

Basically you need to extract month from the field.

month(Date, 'DD/MM/YYYY') as month -> will return month in Numeric format ->01,02,03...

month(Date, 'DD/MMM/YYYY') as month -> will return month in short text format -> Jan, Feb, Mar.....

Already you have month's in Long text, just extract month from the field

month(Date) as Month

I welcome all your comments and feedback.

Regards

Pavan...

jagan
Partner - Champion III
Partner - Champion III

Hi Ankitha,

If you have date field in script then try like this

LOAd

     Date(DateFieldName, 'MMMM-YY') AS MonthYear

     *

FROM DataSource;

Now use MonthYear as dimension.

Regards,

Jagan.