Skip to main content
← PL/SQL Topics

String & Data Functions

Explain SYSDATE vs SYSTIMESTAMP and the session time zone

SYSDATE vs SYSTIMESTAMP

ExplanationOracle Fusion / EBS · Technical · PL/SQLHigh confidenceGenerated

SYSDATE is a DATE (no fractional seconds, no zone); SYSTIMESTAMP is a TIMESTAMP WITH TIME ZONE at the database server.

How it works

SYSDATE and SYSTIMESTAMP return the database server's clock. SYSDATE is a DATE — resolution of one second, no time-zone information. SYSTIMESTAMP is TIMESTAMP WITH TIME ZONE with fractional seconds and the server's zone. CURRENT_DATE and CURRENT_TIMESTAMP instead return the time in the session's time zone (ALTER SESSION SET TIME_ZONE). LOCALTIMESTAMP is the session-zone time without the zone component.

How it works
SELECT SYSDATE,
       SYSTIMESTAMP,
       CURRENT_TIMESTAMP,          -- session time zone
       LOCALTIMESTAMP,
       SYSTIMESTAMP AT TIME ZONE 'UTC' AS utc_now
  FROM dual;

Related questions

GroundingGenerated

Model-generated, grounded against the curated knowledge layer. Check specifics against your instance.

Have a follow-up, or a different question?

Continue in Ask Oracle AI