Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to load month/year format as datetime, so '01/2012' would become 01/01/2012 datetime.
However I don't quite understand why the following doesn't work
Test:
LOAD
Amount,
Date(MonthYear, 'MM/YYYY') as MyDate
INLINE [Amount, MonthYear
1, 01/2012
3, 01/2012
4, 01/2012
5, 01/2012
6, 01/2012
7, 01/2012];
I also trie the following
Date('01/' & MonthYear, 'DD/MM/YYYY') as MyDate
But that didn't work either.
What could be wrong with my load script?
Hi
Use
Date(Date#(MonthYear, 'MM/YYYY')) as MyDate
Or, if you want to be more explicit:
MonthStart(Date#(MonthYear, 'MM/YYYY')) as MyDate
The Date() function formats the display format of a date. The Date#() function interprets a string value as a date.
Hope that helps
Jonathan
Hi
Use
Date(Date#(MonthYear, 'MM/YYYY')) as MyDate
Or, if you want to be more explicit:
MonthStart(Date#(MonthYear, 'MM/YYYY')) as MyDate
The Date() function formats the display format of a date. The Date#() function interprets a string value as a date.
Hope that helps
Jonathan