Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a document where i am using dates from different sources and all dates are with different formats. How do I make all dates into the same format.
Thanks in advance,
Ramdas Hegde
Hi,
Use
Date(alt(dateFieldName,
dateFieldName1,
dateFieldName2
),'DD/MM/YYYY') as Newdate
Regards,
Hi,
Use
Date(alt(dateFieldName,
dateFieldName1,
dateFieldName2
),'DD/MM/YYYY') as Newdate
Regards,
Check below script which will tell you how to convert different date format in a single date format...
============
Load
RowNo() as NO,
PRODUCT_DETAIL_CODE,
PURCHASE_DATE as Original_PURCHASE_DATE,
Date(Alt(
Date#(PURCHASE_DATE,'DD-MMM-YY'),
Date#(PURCHASE_DATE,'MMM YYYY'),
Date#(PURCHASE_DATE,'YYYYMMDD'),
Date#(PURCHASE_DATE,'D-MM-YY'),
),
'DD-MM-YYYY') as Modified_PURCHASE_DATE
Inline
[
PURCHASE_DATE, PRODUCT_DETAIL_CODE
14-Nov-07, Others
Dec 2010, 10128738
26-Feb-08, 11197529
14-Dec-07, 11438953
18-Nov-05, 11425786
11-Sep-13, 11208766
30-Aug-13, 11209023
2-Sep-13, 11208856
23-Oct-13, 11208959
10-Sep-13, 11209074
12-Feb-13, 11208907
8-Nov-13, 11198348
Nov 2010, 43005270
9-Sep-13, 11170032
];
================
Hope this helps..
Hi,
Since date have different format, You can use as below in edit script:
Year(date#(created_date,'MM/DD/YYYY')) as YEAR
Thank you all it helped me a lot....