Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

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

Sure, try this:

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

Replace '2015/01' with your date field.

reddys310
Honored Contributor II

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

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

MVP
MVP

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

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.

Community Browser