4 Replies Latest reply on Sep 11, 2018 7:11 AM by marc.kusters

    Trouble converting SAP JSON datetime to timestamp

    marc.kusters

      I got the following problem, I tried consuming a SAP SuccessFactor REST service as JSON. This works without problems. However, I'm having trouble converting the date to a normal timestamp.

       

      The format of the date in milliseconds is as follows: \/Date(253402214400000)\/ or a less extreme example \/Date(1441269314000)\/

      Getting the value of that is easy with regex replace. However the next step is using FROM_UNIXTIME(). The only problem is that FROM_UNIXTIME() only accepts integer values while a Unix timestamp is at least a long.

      Trying to solve it with TIMESTAMPADD does not work since it also only accepts integer values.

       

      Is there something I missed?