The COMBINED-DATETIME function

ENTMF 

Description

The COMBINED-DATETIME function returns a single numeric item representing a date time combination from a supplied date in integer date form and a time in standard numeric time. The function type is numeric.

General Format

FUNCTION COMBINED-DATETIME (argument-1, argument-2)

Arguments

  1. Argument-1 must be an integer date, corresponding to the number of days since 31 December 1600; see Integer Date Form in Date and Time Formats for more details.
    Note: Setting the INTDATE Compiler directive to a value other than its default value will have an effect on this calculation.
  2. Argument-2 must be a value in standard numerical time form representing time as seconds-past-midnight; see Standard Numerical Time Form in Date and Time Formats for more details.

Returned Values

  1. The returned value is a numeric item determined by the result of argument-1 + argument-2/100000. This means the date will always occupy the integer part and the time will always occupy the fractional part of the returned value. The ARITH Compiler directive affects the number of digits in the output, see ARITH for more details.

Examples

Using the following function arguments, with the default INTDATE"ANSI" Compiler directive, returns the value 151069.18990456:

FUNCTION COMBINED-DATETIME(151069,18990.456) 

Using the same arguments with INTDATE"LILIAN", the first argument (151069) now corresponds to the 25th of May 1996 (which has standard integer date value 144416), so the returned value will be 144416.18990456 due to the conversion to standard integer date form.