You can probably use the Month field instead of Month-Year to get the result. If you do not already have a month field (Jan,Feb....), you can create the month field by using month(YourDateFieldName) as Month in the script. Then use the expression that Jagan posted.
As far as month names are concerned, you could use an inline mapping table for mapping months with their corresponding names as follows....
LOAD * INLINE [
Hope this helps.
By using partial reload, I could insert a numeric month field. Here is the code :
ADD LOAD *,
Date(DAT_ADMIN) AS CalendarDate,
Day(DAT_ADMIN) AS CalendarDay,
WeekDay(DAT_ADMIN) AS CalendarDayName,
Week(DAT_ADMIN) AS Week,
Month(DAT_ADMIN) AS CalendarMonth,
'Q' & Ceil(Month(DAT_ADMIN)/3) AS Quarter,
Year(DAT_ADMIN) AS Year,
WeekName(DAT_ADMIN) as CalendarWeekNumberAndYear,
MonthName(DAT_ADMIN) as Month,
QuarterName(DAT_ADMIN) as CalendarQuarterMonthsAndYear,
DayStart(DAT_ADMIN) as CalendarDayStart,
WeekStart(DAT_ADMIN) as CalendarWeekStart,
MonthStart(DAT_ADMIN) as CalendarMonthStart,
QuarterStart(DAT_ADMIN) as CalendarQuarterStart,
YearStart(DAT_ADMIN) as CalendarYearStart,
DayEnd(DAT_ADMIN) as CalendarDayEnd,
WeekEnd(DAT_ADMIN) as CalendarWeekEnd,
MonthEnd(DAT_ADMIN) as CalendarMonthEnd,
QuarterEnd(DAT_ADMIN) as CalendarQuarterEnd,
YearEnd(DAT_ADMIN) as CalendarYearEnd,
'Q' & Ceil(Month(DAT_ADMIN)/3) & '/' & Year(DAT_ADMIN) AS CalendarQuarterAndYear,
Num(Month(DAT_ADMIN)) AS MonthNo,
Year(DAT_ADMIN) & '/' & 'Q' & Ceil(Month(DAT_ADMIN)/3) AS CalendarYearAndQuarter;
ADD LOAD date(fieldvalue('DAT_ADMIN',recno())) as DAT_ADMIN
Any idea ?
Many thanks in advance.