Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am unable to get the values for Monthyear
Below is my script
LOAD *,
Year(date#(Date,'DD-MMM-YY')) as Year,
Month(date#(Date,'DD-MMM-YY')) as Month,
Day(date#(Date,'DD-MMM-YY')) as Day,
Week(date#(Date,'DD-MMM-YY')) as Week,
'Q' & ceil(Num(Month(date#(Date,'DD-MMM-YY')))/3) as Quater,
Dual(Month(Date) & '-' & Date(Date, 'YY'),
Num(Year(Date)) & Num(Month(Date), '00')) AS MonthYear,
//Date(MonthStart(Date), 'MMM-YYYY') as [Month-Year],
i trid abve for that but it is not givng the values?
It seems like your date isn't interpreted as date, may be this:
MonthName(Date#(Date,'DD-MMM-YY')) as MonthYear
or
Date(MonthStart(Date#(Date,'DD-MMM-YY')), 'MM-YY') as MonthYear
Why don't you use MonthName() function or Date function?
MonthName(Date) as MonthYear
or
Date(MonthStart(Date), 'MM-YY') as MonthYear
Date functions are already dual in nature and hence if you use them, you will not have to use Dual function to assign them text and numeric values. Are you looking for a specific format for MonthYear?
Date(date#(Date,'DD-MMM-YY') ,'YYYYMM') as YYYYMM,
i tried but no use sunny ... same result
It seems like your date isn't interpreted as date, may be this:
MonthName(Date#(Date,'DD-MMM-YY')) as MonthYear
or
Date(MonthStart(Date#(Date,'DD-MMM-YY')), 'MM-YY') as MonthYear
No specific format.... jst i want monthyear field
I would recommend using MonthStart so that Day is normalized to 1 and MonthYear field doesn't repeat in list box
thnks sasi .
ur expression is also wrkng same wat i want