SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-62
COMPUTE_TIMESTAMP Function
COMPUTE_TIMESTAMP Function
COMPUTE_TIMESTAMP is an SQLCI function that returns a Julian timestamp in
Greenwich mean time for a specified date and time. The data type of the returned
value is NUMERIC(18) or LARGEINT.
COMPUTE_TIMESTAMP works in the report writer commands BREAK FOOTING,
BREAK TITLE, DETAIL, PAGE FOOTING, PAGE TITLE, REPORT FOOTING, and
REPORT TITLE. It also works in the SQLCI commands EXECUTE and SET PARAM.
COMPUTE_TIMESTAMP does not work in DML statements or other SQL statements.
Considerations—COMPUTE_TIMESTAMP
COMPUTE_TIMESTAMP converts the timestamp from local civil time to
Greenwich mean time.
If you use one of the first two forms of the argument, the argument must appear on
a single input line.
For the third form, any of the arguments can be either a numeric literal or a column
identifier (but not a numeric expression).
The range of valid dates is from 01/02/0001 00:00:00:000:000 through 12/31/9999
00:00:00:000:000.
COMPUTE_TIMESTAMP is not compatible with date-time data types. It returns a
value of data type NUMERIC(18) or LARGEINT, not data type TIMESTAMP or
DATETIME YEAR TO FRACTION.
{mm/dd/yyyy }
{ }
COMPUTE_TIMESTAMP ( {mm/dd/yyyy hh:nn:ss:mss:uss} )
{ }
{yyyy, mm, dd }
{ [,hh,nn,ss,mss,uss] }
yyyy Year (1 through 9999, 1-4 digits)
mm Month (1 through 12, 1-2 digits)
dd Day (1 through 31, 1-2 digits)
hh Hour (0 through 23, 1-2 digits)
nn Minute (0 through 59, 1-2 digits)
ss Second (0 through 59, 1-2 digits)
mss Millisecond (0 through 999, 1-3 digits)
uss Microsecond (0 through 999, 1-3 digits)