invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

UTC

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    start((START)) --> UTC_DATE[UTC_DATE]:::quoted
    UTC_DATE --> parenthesis["()"]:::quoted
    UTC_DATE --> utc_end((END))
    start((START)) --> GETUTCDATE[GETUTCDATE]:::quoted
    GETUTCDATE --> parenthesis["()"]:::quoted
    start((START)) --> NOWUTC[NOWUTC]:::quoted
    NOWUTC --> parenthesis["()"]:::quoted
    start((START)) --> SYSDATEUTC[SYSDATEUTC]:::quoted
    SYSDATEUTC --> utc_end((END))
    parenthesis --> utc_end((END))

Purpose

The UTC SQL function returns the time of the system clock in UTC time at the device where Invantive UniversalSQL runs. It is written as sysdateutc without parentheses, as utc_date with or without parentheses, or as getutcdate() or nowutc() with parentheses.

Within one SQL statement the outcome is one moment, in every occurrence, subquery, view and row, and the same instant as NOW returns in local time; every execution gets a new moment, and in a PSQL block an evaluation outside a SQL statement reads the clock anew every time. Up to release 27.0, the occurrences within one statement could differ by a fraction of a second.

See also NOW and UTCOFFSET.

Returns: current date/time.

Examples

The following example retrieves the current system date/time in UTC as text; the actual value differs per invocation:

select to_char(sysdateutc, 'YYYY-MM-DD HH24:MI:SS')

-------------------
2026-07-03 07:15:27

The following example retrieves the current system date in UTC as text using the UTC_DATE synonym; the actual value differs per invocation:

select to_char(utc_date(), 'YYYY-MM-DD')

----------
2026-07-03