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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
niharikab
Contributor II
Contributor II

Date Format Help

Hi Experts,

Can any one please help me to convert the below multiple date formats into DD-MM-YYYY Format.

I have tried like below but all are getting in DD/MM/YYYY format when i have changed DD-MM-YYYY also its showing DD/MM/YYYY only.

Date(alt(SalesDate,Date#(SalesDate,'DD-MM-YYYY'),Date#(SalesDate,'DD/MM/YYYY'),Date#(SalesDate,'DD.MM.YYYY'),'DD-MM-YYYY')) AS [Date]

Calender:
Load *,
Date(alt(SalesDate,Date#(SalesDate,'DD-MM-YYYY'),Date#(SalesDate,'DD/MM/YYYY'),Date#(SalesDate,'DD.MM.YYYY'),'DD/MM/YYYY')) AS [Date]

Inline [
SalesDate,Sales
01-02-2015,100
02/03/2016,200
03.04.2017,300

];Calender.png

Please help me on this.

Thanks in advance. 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try this:

Calender:
Load *,
Date(alt(SalesDate,Date#(SalesDate,'DD-MM-YYYY'),Date#(SalesDate,'DD/MM/YYYY'),
Date#(SalesDate,'DD.MM.YYYY')),'DD-MM-YYYY') AS [Date] Inline [ SalesDate,Sales 01-02-2015,100 02/03/2016,200 03.04.2017,300 ];

View solution in original post

1 Reply
tresB
Champion III
Champion III

Try this:

Calender:
Load *,
Date(alt(SalesDate,Date#(SalesDate,'DD-MM-YYYY'),Date#(SalesDate,'DD/MM/YYYY'),
Date#(SalesDate,'DD.MM.YYYY')),'DD-MM-YYYY') AS [Date] Inline [ SalesDate,Sales 01-02-2015,100 02/03/2016,200 03.04.2017,300 ];