Skip to content
Date & Time getCreationDateTimestamp

$getCreationDateTimestamp

Extracts the creation instant encoded in a Discord ID (user, server, channel, role, message…) and returns it as a Unix timestamp.

Syntax

$getCreationDateTimestamp[ID;(Time unit)]

Parameters

Parameter Description
ID Required. A positive unsigned 64-bit Discord ID, otherwise the error “Expected a positive unsigned 64-bit Discord ID.” is raised.
Time unit Optional. s (seconds, default) or ms (milliseconds). Any other value raises “Time unit must be s or ms.”.

Return value

  • The Unix timestamp of the creation of the ID.

Examples

Discord timestamp

Account created: <t:$getCreationDateTimestamp[$authorID]:R>

Milliseconds

$getCreationDateTimestamp[$channelID;ms]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.