1

This is a sample of datetime field:

1615717137369

It means 2 days ago (from 16 march, 13:24)

How can I parse the number?

P.S: These are some examples:

16 15 89 8678037    16 March 16:15 ( 5 min ago)

16 15 89 8259356 16 March 16:08 (12 min ago)

16 15 89 791 8713 16 March 16:03 (17 min ago) 16 15 89 791 4439 16 March 16:03 (17 min ago) 16 15 89 791 0813 16 March 16:03 (17 min ago)

16 15 89 210 4036 16 March 14:20 ( 2 hr ago)

16 15 64 022 8942 13 March (3 days ago)

16 10 43 350 1644 13 Jan (2 month ago) ```

2 Answers2

2

As Emil said, That is the number of milliseconds since the Unix epoch (1 Jan 1970 midnight UTC).

1

The data you have is just a large integer. So you parse it like you would parse any large integer. Now there should be documentation what the integer means - if there is none then you will guess.

If the number was days since a date X, calculate what X would be. If the number was seconds since a date X, calculate what X would be. If the number was nanoseconds since a date X, calculate what X would be. Maybe it's a different unit. Pick what unit gives the most reasonable looking date. For example, if X is the year 1582 (introduction of the Gregorian calendar), that would be quite reasonable.

PS. I hate Windows. Giving dates using milliseconds is perverted IMO.

gnasher729
  • 29,996
  • 34
  • 54