Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Sure, try this:
=Date(Date#('2015/01', 'YYYY/MM'), 'MMM. YYYY')
Replace '2015/01' with your date field.
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
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.