Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm battling to convert this raw data into a normal date.
here is an example of the date stamp (CreatedDate field) import: "2015-06-11T09:45"
I want to convert this to just the normal date like this: "2015/06/11".
Please assist with syntax for this.
Many thanks
Try this:
Date(Date#(Left(CreatedDate, 10), 'YYYY-MM-DD'), 'YYYY/MM/DD') as Date
Try this:
Date(Date#(Left(CreatedDate, 10), 'YYYY-MM-DD'), 'YYYY/MM/DD') as Date
Perfect! Thanks
Hi,
You can also try like this
LOAD
*,
MakeDate(SubField(CreatedDate, '-', 1), SubField(CreatedDate, '-', 2), SubField(CreatedDate, '-', 3)) AS Date
FROM DataSource;
Hope this helps you.
Regards,
jagan.
Hi,
Check this,
Replace(SubField(Field,'T',1),'-','/')
HTH,
Hirish
Try like:
date(Timestamp#(replace(CreateDate, 'T', ' '), 'YYYY-MM-DD hh:mm'), 'YYYY/MM/DD') as NewDate
Also try,
Date(Date#(PurgeChar(CreatedDate,'T'),'YYYY-MM-DDhh:ss'),'YYYY/MM/DD')
OR
Date(Date#(Replace(CreatedDate,'T',''),'YYYY-MM-DDhh:ss'),'YYYY/MM/DD')
Dear Manus,
Here is a script for timestamp conversion
Table1:
LOAD *, Date(Left(Date, Index(Date, 'T') - 1), 'YYYY/MM/DD') as newDateField Inline [
Date
2015-06-11T09:45
];
For more detail, kindly find attached App.
Kind regards,
Ishfaque Ahmed
If your question is now answered, please flag the Correct Answer and optionally Helpful Answers.
If not, please make clear what part of your question you still need help with .