serial date

Prev Next

Function Names

serial date

Description

These functions converts a date to serial date as used in Microsoft Excel. The serial date begins on 01.01.1990 with value 1. 0 is returned for values without recognizabale date. The value is always an integer and does not include any time-of-day offset.

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
date or string converted to date Date

Value to extract as described above

Return value

TypeDescription
numeral Result

Returned value as described above

Examples

      echo( serial date( 18.06.2020 ), ", ", serial date( "18.06.2020 18:00" ), ", ", serial date( 01.01.1990 ), ", ", serial date( "" ) );

Output

44000, 44000, 32874, 0
Try it yourself: Open LIB_Function_serial_date.b4p in B4P_Examples.zip. Decompress before use.

See also

Date info functions