Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Actually datefield contains value as '2013-08-21T18:36:15'
But, I need only date as '2013-08-21'.
I used Date() function inside Load statement,but Iam not getting exact value..
I need to apply function inside Load statement..
Please provide the solution for it..
Thanks
Nagaraju
If Date doesn't worked then you can try with Left(datefield,10)
Try this
Date(Datefield,'yyyy-mm-dd') as newDate
Hope it will help
= date(date#(left('2013-08-21T18:36:15',10),'YYYY-MM-DD'), 'YYYY-MM-DD')
EDIT: in a load
LOAD
....
date(date#(left('2013-08-21T18:36:15',10),'YYYY-MM-DD'), 'YYYY-MM-DD') as newdatefield,
......
FROM
....
replace '2013-08-21T18:36:15' with the field
Use below in your script....
Date(Date#(Left(2013-08-21T18:36:15,,10),'YYYY-MM-DD')) as Date
Use in load script like
Load
Date(Date#(Left('2013-08-21T18:36:15',10),'YYYY-MM-DD'), 'YYYY-MM-DD') as UpdatedDatefield,
Left(YourdateField,10) as NewDatefield
From Location;
try
Thanks to all.. Now,Its working fine.
Thanks
Nagaraju
If you got correct answer from thread so mark Correct / Helpful for reference.
Regards