Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date function not working on all data

I have data that represents a date in the format 'YYMMDD' and I am converting it to a readable date format of 'MM/DD/YYYY' with the following script:

Capture.JPG

This is working for most of the dates but there are a few that are not coming over in the correct format:

Capture.JPG

The 040806 toward the end should be coming in as 10/11/2011 and the 040623 at the bottom should be 03/21/11. Any thoughts on why this works on some but not others?

2 Replies
mphekin12
Specialist
Specialist

Have you tried something like this in the load script:

timestamp(OriginalDate,'M/D/YYYY h:mm:ss[.fff] TT') as OriginalDate,

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Its better to use like below

     Date(Date#(OriginalDate,'YYMMDD'),'MM/DD/YYYY') as OriginalDate

Celambarasan