TO_MICROSECONDS
Converts a specified number of microseconds into an Interval type.
- Accepts positive integers, zero, and negative integers as input.
Analyze Syntax
func.to_microseconds(<microseconds>)
Analyze Examples
func.to_microseconds(2)
+------------------------------------------------------+
| func.to_microseconds(2) |
+------------------------------------------------------+
| 0:00:00.000002 |
+------------------------------------------------------+
SQL Syntax
TO_MICROSECONDS(<microseconds>)
Return Type
Interval (in the format hh:mm:ss.sssssss
).
SQL Examples
SELECT TO_MICROSECONDS(2), TO_MICROSECONDS(0), TO_MICROSECONDS((- 2));
┌────────────────────────────────────────────────────────────────┐
│ to_microseconds(2) │ to_microseconds(0) │ to_microseconds(- 2) │
├────────────────────┼────────────────────┼──────────────────────┤
│ 0:00:00.000002 │ 00:00:00 │ -0:00:00.000002 │
└────────────────────────────────────────────────────────────────┘