Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi ,
the data i am loading has a date format like 20160705 and i need to change it to date format.
is there a way i can change in the load statement?
regards,
marvin
Yes you can, try this:
LOAD Date(Date#(DateField, 'YYYYMMDD'), 'MM/DD/YYYY') as DateField
....
Also read here:
use
date#(yourdatefield,'YYYYMMDD')
you can convert it to other dateformat (if not your Standard dateformat)
date(date#(yourdatefield,'YYYYMMDD'),'MM/DD/YYYY')
Please try :
Date(Floor(Date#(your_date_field, 'YYYYMMDD')), 'MM/DD/YYYY')
cool thanks i will give it a shot
The value gives me this 59097/08/16. it seems the year is in string?
or
=date(MakeDate(left(data,4),mid(data,5,2),right(data,2)),'DD-MMM-YYYY')
try below script with load
Format:
LOAD * INLINE [
dateformat
20160705
];
Result:
LOAD *,
Date(Date#(dateformat,'YYYYMMDD'),'MM-DD-YYYY') AS Newdate
Resident Format;