Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mwallman
Creator III
Creator III

How do I fix this mix format of dates issue in a Date field?

Hello friends!

I have the following table:

Date
Value
11-Nov-2015330
15/01/2016400
16/01/2016500
21-Feb-2015600

How do I solve the mix format of dates in the Date field to a single consistent format of DD/MM/YYYY?

I have tried using Date, Date#, MakeDate functions but did not have much luck solving the problem. My attempts ended up excluding the string based dates.

How can I solve this?

2 Replies
sunny_talwar

You can try this with Alt and Date# functions

Date(Alt(Num(Date), Num(Date#(Date, 'DD-MMM-YYYY')), Num(Date#(Date, 'DD/MM/YYYY')))) as Date


Capture.PNG

swuehl
MVP
MVP

Try

LOAD

    Date( Alt(Date#(DATEFIELD,'DD-MMM-YYYY'), Date#(DATEFIELD,'DD/MM/YYYY') ),'DD/MM/YYYY') AS DATEFIELD,

   ...

FROM ..