Operations Using Date and Time Values
The method of storing date and time values makes it possible to involve them as operands in some arithmetic operations.In storage, a date value or datepart of a timestamp is represented as the number of days elapsed since “date zero” — November 17, 1858 — whilst a time value or the timepart of a timestamp is represented as the number of decimilliseconds (100 microseconds) since midnight.
An example is to subtract an earlier date, time or timestamp from a later one, resulting in an interval of time, in days and fractions of days.
Operand 1  Operation  Operand 2  Result 











Numeric value 











Numeric value 



Numeric value 



Numeric value 



Numeric value 




Number of days elapsed, within the range 


Numeric value 




Number of seconds elapsed, within the range 



The without time zone value is converted to WITH TIME ZONE in the current session time zone.Number of seconds elapsed between the UTC values, within the range 



Number of seconds elapsed between the UTC values, within the range 


Numeric value 




Number of days and partday, within the range 



The without time zone value is converted to WITH TIME ZONE in the current session time zone.Number of days and partday between UTC values, within the range 



Number of days and partday between UTC values, within the range 


Numeric value 

Note

Notes
In Dialect 1, the 