Kbase P146144: SQL: Why do the NOW(), SYSTIMESTAMP and SYSTIMESTAMP_TZ functions always return 0 milliseconds?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/05/2009 |
|
Status: Unverified
GOAL:
SQL: Why do the NOW(), SYSTIMESTAMP and SYSTIMESTAMP_TZ functions always return 0 milliseconds?
GOAL:
Can the NOW(), SYSTIMESTAMP and SYSTIMESTAMP_TZ return results with millisecond precision?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
The above three functions work as designed when they return 0 for the millisecond part of their results. Examples:
1. Executing the SQL statement:
SELECT NOW() FROM pub.Customer WHERE Custnum = 1
Returns the time stamp with 0 milliseconds part:
2009-05-13 13:06:05.000
2. Executing the SQL statement:
SELECT SYSTIMESTAMP FROM pub.Customer WHERE Custnum = 1
Returns the system time stamp with 0 milliseconds part:
2009-05-13 13:07:08.000
3. Executing the SQL statement:
SELECT SYSTIMESTAMP_TZ FROM pub.Customer WHERE Custnum = 1
Returns the system time stamp with time zone with 0 milliseconds part:
2009-05-13 13:06:32:000 - 04:00
The fact that milliseconds is always 0 for these functions is a design decision motivated by the desire to get reasonable portability of the Progress SQL implementation across all platforms, including platforms which might not have a high precision time facility.
These functions are not part of the SQL standard and may change their precision (to make it better) at some future time. At the present time, these functions do not provide "seconds fraction" value - i.e., they do not give non-zero milliseconds.