2 Replies Latest reply on Sep 22, 2019 3:50 AM by Jim Dehner

    Parse Date without Using DATEPARSE

    chen zhu

      Hi,

      My date has two format:

      7/3/2013

      07/03/2013

      The date above is March 7 2013. The problem is that the leading 0 is optional. Since I am using ODBC, DATEPARSE  is not supported. Is there a other way to convert the string to date format?

       

      Thanks!

        • 1. Re: Parse Date without Using DATEPARSE
          Hari Ankem

          See if this helps:

          1.png

           

          MAKEDATE(

              INT(SPLIT([Date in String Format],"/",3)),

              INT(SPLIT([Date in String Format],"/",2)),

              INT(SPLIT([Date in String Format],"/",1))

          )

           

          Note: Replace the "Date in String Format" with the string dimension that needs to be converted to date format.

          • 2. Re: Parse Date without Using DATEPARSE
            Jim Dehner

            good morning

            depending on the data source you may not be able to use Makedate()  

            in those cases you can try Date()

             

            or just click on the ABC icon and recast to date

             

            either will return this

             

            Jim

            If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.