Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
What wrng in my expression
my date field as
date
2014-may-05
2014-may-06
2014-may-07
2014-may-08
2014-may-09
2014-may-10
=date(MonthsStart( "date"), 'YYYY-MMM')
i want to display date as :2014-may
how can i get this date.
The manually written date was only to show that the logic and syntax is right - you could it replace directly with your date-field. If you get then no valid result it meant that your date-field contained a different value and/or format then you expect. Maybe it needs then a trim() or it is really a timestamp instead a date and the expressions needs to be adjusted a little bit.
- Marcus
the same expression can work in a chart
you can do a straight table chart with (this is just an example) a
- calculated dimension date(MonthStart(date#(datefield, 'YYYY-MMM-DD')), 'YYYY-MMM') as newdatefield
- expression count(datefield)
this is the script for the example above
Source:
load * inline [
datefield
2014-may-05
2014-may-06
2014-may-07
2014-may-08
2014-may-09
2014-may-10
2015-may-10
];
Thnx M G and Marcus. your info is awesome. grt explnatn. .
hi,
It is not working alrdy tried dat one.
Thanks
Suresh