Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello friends!
I have the following table:
Date | Value |
---|---|
11-Nov-2015 | 330 |
15/01/2016 | 400 |
16/01/2016 | 500 |
21-Feb-2015 | 600 |
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?
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
Try
LOAD
Date( Alt(Date#(DATEFIELD,'DD-MMM-YYYY'), Date#(DATEFIELD,'DD/MM/YYYY') ),'DD/MM/YYYY') AS DATEFIELD,
...
FROM ..