Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a question I was hoping someone would be able to help me with. I am trying to write a command to fetch the date format from a column filled with dates: some are ddmmyyyy, some are mmddyyyy and so on and so forth. I was advised to use the ALT function, which now takes the following shape:
ALT( date#([Date], 'DD/MM/YYYY'), date#([Date], 'MM/DD/YYYY'), date#([Date], 'DD/MM/YYYY'), 'No Date Found') AS [Date Type]
But the function populates my 'Date Type' column with 'No Date Found' and doesn't recognise any of the dates in the 'Date' String. I tried running a trial command using ALT(date#([Date], ' correct date format specified in the initial set command'), 'No Date Found'), and the function still returns 'No Date Found'.
Any ideas on how to fix that?
please provide sample data/application
Hi,
Try this one. it is help full for you.
date(alt(date#(DateString, 'YYYY-MM-DD'), date#(DateString, 'DD-MM-YYYY'), date#(DateString, 'DD/MM/YYYY'), 'NO DATA FOUND'),'DD/MM/YYYY') AS Date