---
title: "MICROSECOND"
description: "The MICROSECOND SQL function extracts the microseconds from a date/time."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/microsecond
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/microsecond
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> MICROSECOND[MICROSECOND]:::quoted
    MICROSECOND --> LB["("]:::quoted
    LB --> Input
    Input --> RB[")"]:::quoted
    RB --> End((END))
```

## Purpose
The `MICROSECOND` SQL function extracts the microseconds from a date/time.

See also [[DAY]], [[HOUR]], [[MILLISECOND]], [[MINUTE]], [[MONTH]], [[SECOND]] and [[YEAR]].

Parameters:
- Input (`datetime`): the date/time to extract the microseconds from.

Returns: the microseconds as an `int32`.

## Examples
The following example extracts the microseconds from current system date/time in UTC:
```sql
select microsecond(sysdateutc)

-------------------
963926
```
The following example extracts the microseconds from a fixed date/time:
```sql
select microsecond(to_date('2016-12-31T12:34:56.1234567'))

-------------------
123456
```