Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a date field which is in '2018-08-31' format. I used the following expression in my script to get the Year and Month from it;
Year(Date) as Year,
date(Date, 'MMMM') as Month
But when I used list box for Year and Month, I am getting 12 months for 2016, separate 12 months for 2017 and separate 9 months for 2018. How to resolve this, to get the same months for all the years?
thanks
Can you attach a sample file along the expected output ?
May be use Month(Date) AS Month
I have used Month(Date) AS Month and I am getting same months for all years. But my month are like Jan, Feb, Mar....
But I want to have full month names
try
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
Dual( date(OrderDate, 'MMMM'), Month(OrderDate)) AS Month
Hi Bhavesh,
If you want full months names you will get with the creation of the Inline table for that, like bellow
SNo Short_Month Full_Month
1 Jan January
2 Feb February
. . .
. . .
After creating you just form associate between existing short month table.
This is very helpful in different situations. with this, you can use short and full month names where you want.
Regards,
Gopi
Try what Dilip suggested using 'MMMM' or you can also use Mapping table like
FullMonthName:
MAPPING LOAD * INLINE [
Month, MonthName
Jan, January
Feb, February
Mar, March
Apr, April
May, May
Jun, June
Jul, July
Aug, August
Sep, September
Oct, October
Nov, November
Dec, December
];
Load
ApplyMap('FullMonthName', Text(Month(DateField))) AS MonthNames
From yourtablename;