1 Reply Latest reply on Jul 29, 2021 1:30 AM by Teodoro Salluzzi

    Convert epoch time to xs:dateTime in ICAI

    Robson Miranda de Souza Toyofuku New Member

      This is how I managed to convert a date of type Epoch to dateTime in xQuery:

       

      let $LastChangeDate := '1627344000000'

       

      return

       

      xs:dateTime("1970-01-01T00:00:00-00:00") + xs:dayTimeDuration(concat("PT",(fn:substring($LastChangeDate, 1, 10)), "S"))

       

      Result: 2021-07-27T00:00:00Z