Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have following data field in a data table
Month Year
Jan 2012
Jan 2012
Feb 2013
Mar 2014
and I want to convert it to date field as TRN_DATE. I have written following script which is not working. Kindly let me know where I am wrong
Date(MonthEnd(Date#([Year] &'-'& [Month],'YYYY-MM')),'DD-MMM-YYYY') AS [TRN_DATE],
Correct the Month field format, and try like
Date(MonthEnd(Date#([Year] &'-'& [Month],'YYYY-MMM')),'DD-MMM-YYYY') AS [TRN_DATE],
Hi
Use Makedate() Function.
Date(MonthEnd(makedate(Year,Month,1)),'DD-MMM-YYYY')
First convert your month into Number than use below script.
Try something like this:
Table:
Load *, Date(MonthEnd(makedate(Year,Month,1)),'DD-MMM-YYYY') AS NewDate Inline [
Month, Year
1, 2012
4, 2012
2, 2013
3, 2014
];
Also, See the Attachment.
Regards
Av7eN
Correct the Month field format, and try like
Date(MonthEnd(Date#([Year] &'-'& [Month],'YYYY-MMM')),'DD-MMM-YYYY') AS [TRN_DATE],
Hi Upali,
Let try this one
Date(MonthEnd(Date#([Year] &'-'& [Month],'YYYY-MMM')),'DD-MMM-YYYY') AS [TRN_DATE],
Regards,
Sokkorn
Thanks all