8 Replies Latest reply on May 6, 2015 2:39 PM by kettan

    Using DATEPARSE() to Parse ISO8601 Dates

    Braxton Ehle

      I'm trying to get a CSV that records its time in ISO8601 format and it doesn't look like the dateparse function is able to handle it. I'm trying to figure out if I'm doing something silly or if it's a bug in dateparse.

       

      Date format looks like:

      2015-02-20T08:58:54-08:00

      2015-02-20T09:50:53-08:00

      2015-02-20T09:51:21-08:00

      2015-02-20T20:18:48-08:00

       

      Using the standard date functions from Formatting Dates and Times - ICU User Guide I come up with:

       

      DATEPARSE("yyyy-MM-dd'T'HH:mm:ssxxx",[Created-At])

       

      Which yields an error:

      "Must have single quotes around 'x'"

       

      It looks like the final timezone 'xxx' part is what's messing it up. If I remove it, then the calculation validates, but I have no idea what timezone it uses by default.

       

      Oh the joys of parsing dates