DateSerial
Creates a date serial
#include "vbcompat.bi"
result = DateSerial( year, month, day )
year
Returns a date serial containing the date formed by the values in the year, month and day parameters.The date serial returned has no decimal part.
The compiler will not recognize this function unless vbcompat.bi or datetime.bi is included.
Syntax
Usage
#include "vbcompat.bi"
result = DateSerial( year, month, day )
Parameters
year
the year
monththe month of the year
daythe day of the month
Return Value
Returns a date serial containing the date formed by the values in the year, month and day parameters.The date serial returned has no decimal part.
Description
The compiler will not recognize this function unless vbcompat.bi or datetime.bi is included.
Example
#include "vbcompat.bi"
Dim a As Double = DateSerial(2005, 11, 28)
Print Format(a, "yyyy/mm/dd hh:mm:ss")
Dim a As Double = DateSerial(2005, 11, 28)
Print Format(a, "yyyy/mm/dd hh:mm:ss")
Differences from QB
- Did not exist in QB. This function appeared in PDS and VBDOS
See also