Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date column where I get data in varchar not in date format.
ColA
01/2018
01/06/2018
21/12/2017 12:00:00 AM
I need to convert them to a standard date format of DD-MM-YYYY.
If I try the below i get a null date column.
date(date#(ColA,'dd/mm/yyyy hh:mm:ss am'),'DD-MM-YYYY')
What is that I am doing wrong.
Regards
try this
Like this:
Date(
Alt(
Date#(ColA, 'dd/MM/yyyy hh:mm:ss tt'),
Date#(ColA, 'dd/MM/yyyy'),
Date#(ColA, 'MM/yyyy)
)
,'dd/MM/yyyy')
Hi Jonathan,
I think your solution seems to work.
I am testing it further if all seems fine I will mark your answer as the correct answer.
Regards,
Rahul