11 Replies Latest reply: Oct 4, 2015 10:07 AM by mani ram RSS

    Alt function question

      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?