oid_to_timestamp function

Get OID date

Get OID date

The initial 4 bytes of a MongoDB OID contain a timestamp value, representing the ObjectId creation, measured in seconds since the Unix epoch.

oid_to_timestamp(oid)

Arguments

  • oid: string or raw value with document oid

Examples

oid_to_timestamp('5349b4ddd2781d08c09890f3')
  • Maintainer: Jeroen Ooms
  • License: Apache License 2.0
  • Last published: 2025-03-17