Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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. 

 

 

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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 ];