Skip to main content

TO_MICROSECONDS

Introduced or updated: v1.2.677

Converts a specified number of microseconds into an Interval type.

  • Accepts positive integers, zero, and negative integers as input.

Syntax

TO_MICROSECONDS(<microseconds>)

Return Type

Interval (in the format hh:mm:ss.sssssss).

Examples

SELECT TO_MICROSECONDS(2), TO_MICROSECONDS(0), TO_MICROSECONDS((- 2));

┌────────────────────────────────────────────────────────────────┐
│ to_microseconds(2) │ to_microseconds(0) │ to_microseconds(- 2)
├────────────────────┼────────────────────┼──────────────────────┤
0:00:00.00000200:00:00-0:00:00.000002
└────────────────────────────────────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today