1 Reply Latest reply on May 24, 2017 8:53 AM by Steven Hawkins

    Is it possible to define the date format of Excel fields?

    gadeyne.bram Master

      Hi,

       

      I'm trying to import an excel file. Everything works fine but the date fields are in format dd/MM/yyyy and can only be read as string. I've tried setting the format property in teiiddesigner  and setting the data type to date but then I get an exception "Expected format = yyyy-mm-dd for 01/07/1964"

       

      Should this be possible? Do I need to set something else?

        • 1. Re: Is it possible to define the date format of Excel fields?
          Steven Hawkins Master

          > Should this be possible?

           

          The format property in Designer has historically not been used.  It's original intent may have been for situations like this, but I'm not sure.

           

          > Do I need to set something else?

           

          The simplest thing is to add a view layer with the appropriate parseTimestamp.  However that may perform the way you want as we can't generally invert "parseTimestamp(col, format) = timestamp literal" into "col = string literal" due to the laxness of the parsing logic in parseTimestamp. 

           

          So enhancements could be to support the format property in excel - or more generally add an argument to parseTimestamp such that it preforms only strict parsing such that it can be inverted.