Search code examples
dateabaputcdate-formatting

UTC time stamp in long form (YYYYMMDDhhmmss.mmmuuun) formatting


I use an OData Service to import data into SAP system. This is an OData example:

{
   "Id" : "",
   "Timestamp" : "/Date(1449479875000)/",
   "UserName" : "USER",
   "SourceSystemId" : "ANY"
}

Timestamp is defined as (see details here)

UTC time stamp in long form (YYYYMMDDhhmmss.mmmuuun)

When I upload this data to ABAP system, the timestamp results in

20.151.207.091.755,0000000

I don't understand how 1449479875000 becomes 20.151.207.091.755,0000000

How can I upload e.g. 20.181.207.091.755,0000000? Can anybody give me some hint?


Solution

  • The timestamp is in "hours since the Epoch" (1 Jan 1900) format.

    The date 2018-12-07 09:17:55.000 would be represented by /Date(25441742750)/.