Skip to content

Oracle DATE type: milliseconds (second fractions) rounded in H2 but truncated in Oracle #3705

@maecval

Description

@maecval

Oracle DATE type rounded in H2 but truncated in Oracle

behaviour in H2

select SYSDATE, SYSTIMESTAMP from dual;
 
SYSDATE             | SYSTIMESTAMP  
-------------------------------------------------
2023-01-11 16:26:15 | 2023-01-11 16:26:14.971603+01

behaviour in Oracle DB

select SYSDATE, SYSTIMESTAMP from dual;
 
SYSDATE             | SYSTIMESTAMP 
-------------------------------------------------
2023-01-12 07:33:42 | 2023-01-12 07:33:42.829410000 +01:00

Please change H2 to truncate the milliseconds (decimal place of seconds) for DATE type when running in Oracle mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions