Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to convert multiple date format's into single format

Hi,

i tried to convert multiple date formats into one single format but few dates are not converted here i selected the which are date formats not converted. Could you please help me below i attached the script and snapshot.

Date of letter field is source data from there i derived Date of letter1 field.

Script:

Converting_Dateformat:

LOAD

[Date of letter:]

,DATE(ALT(date#([Date of letter:],'DDMYYYY')

,Date#([Date of letter:],'MMDDYYYY')

,Date#([Date of letter:],'DMYYYY')

,Date#([Date of letter:],'MDDYYYY')

,Date#([Date of letter:],'MMDYYYY'),

))  AS      [Date of letter1:]

Resident Table;

ss.png

Thanks,

Yuvaraj

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Try this?

= IF(Len([Date of letter:]) = 7, Date(Date#(Floor([Date of letter:]), 'MDDYYYY'),'MM/DD/YYYY'),

   Date(Date#(Floor([Date of letter:]), 'MMDDYYYY'),'MM/DD/YYYY')) AS DateLetter1

View solution in original post

2 Replies
vishsaggi
Champion III
Champion III

Try this?

= IF(Len([Date of letter:]) = 7, Date(Date#(Floor([Date of letter:]), 'MDDYYYY'),'MM/DD/YYYY'),

   Date(Date#(Floor([Date of letter:]), 'MMDDYYYY'),'MM/DD/YYYY')) AS DateLetter1

Anonymous
Not applicable
Author

thanks nagaraju