Skip to main content

Documentation Index

Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The documentation below is generated from the system.functions system table.

ULIDStringToDateTime

Introduced in: v23.3.0 This function extracts the timestamp from a ULID. Syntax
ULIDStringToDateTime(ulid[, timezone])
Arguments Returned value Timestamp with milliseconds precision. DateTime64(3) Examples Usage example
Query
SELECT ULIDStringToDateTime('01GNB2S2FGN2P93QPXDNB4EN2R')
Response
┌─ULIDStringToDateTime('01GNB2S2FGN2P93QPXDNB4EN2R')─┐
│                            2022-12-28 00:40:37.616 │
└────────────────────────────────────────────────────┘

generateULID

Introduced in: v23.2.0 Generates a Universally Unique Lexicographically Sortable Identifier (ULID). Syntax
generateULID([x])
Arguments
  • x — Optional. An expression resulting in any of the supported data types. The resulting value is discarded, but the expression itself if used for bypassing common subexpression elimination if the function is called multiple times in one query. Any
Returned value Returns a ULID. FixedString(26) Examples Usage example
Query
SELECT generateULID()
Response
┌─generateULID()─────────────┐
│ 01GNB2S2FGN2P93QPXDNB4EN2R │
└────────────────────────────┘
Usage example if it is needed to generate multiple values in one row
Query
SELECT generateULID(1), generateULID(2)
Response
┌─generateULID(1)────────────┬─generateULID(2)────────────┐
│ 01GNB2SGG4RHKVNT9ZGA4FFMNP │ 01GNB2SGG4V0HMQVH4VBVPSSRB │
└────────────────────────────┴────────────────────────────┘

See also