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

is there a way to alter the format of month within the data from yyyy/mm to the abbreviated months (ex. Jan. 2015)

for instance, within my data we have the month field displayed as yyyy/mm but I wanted to display the month as Jan. 15 because it looks better visually.  I have tried to alter the month in the number format drop down in the properties pane, but that doesn't seem to work.  Any recommendations?

Thanks!

3 Replies
sunny_talwar

Sure, try this:

=Date(Date#('2015/01', 'YYYY/MM'), 'MMM. YYYY')

Replace '2015/01' with your date field.

reddy-s
Master II
Master II

Hi Sam,

You can format the dates the way you need. Just paste the code into an app and try.

data:

load *,

     year(date#(years,'YYYY-MM-DD')) as dates,

     monthName(date#(years,'YYYY-MM-DD')) as mName,

     month(date#(years,'YYYY-MM-DD')) as mNa,

// this is the format you asked for

     month(date#(years,'YYYY-MM-DD')) &'. '& Year(date#(years,'YYYY-MM-DD')) as yourFormat ;


load * inline [

years

2015-10-11

2014-12-12

2014-10-30

2016-10-01

];

- Sangram

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*,

Date(Date#('2015/01', 'YYYY/MM'), 'MMM. YYYY') AS NewDateField

FROm Datasource;

Now use this new field wherever you required.

Regards,

jagan.