Parse ObjectID timestamp

Parse timestamp from MongoDB/BSON ObjectID hex string.

Input: TextResult: Text

Text input

Examples

ObjectID timestamp 1970-01-01T00:00:00.000Z

Input

000000000000000000000000

Expected answer

1970-01-01T00:00:00.000Z
ObjectID timestamp 1970-01-01T00:00:01.000Z

Input

000000010000000000000000

Expected answer

1970-01-01T00:00:01.000Z
ObjectID timestamp 1970-01-02T00:00:00.000Z

Input

000151800000000000000000

Expected answer

1970-01-02T00:00:00.000Z
ObjectID timestamp 2000-01-01T00:00:00.000Z

Input

386d43800000000000000000

Expected answer

2000-01-01T00:00:00.000Z
ObjectID timestamp 2024-01-01T00:00:00.000Z

Input

659200800000000000000000

Expected answer

2024-01-01T00:00:00.000Z

Format reference: Parse ObjectID timestamp background and specification

Related tools

Browse utils tools