DateSerial

<< Click to Display Table of Contents >>

Navigation:  Date / Time functions >

DateSerial

Description

Returns a Date value for a specified year, month, and day.

Syntax

DateSerial(year, month, day)

 

Parameters

Part

Type

Description

year

Integer

Required. Number between 100 and 9999, inclusive, or a numeric expression

month

Integer

Required. Any numeric expression.

day

Integer

Required. Any numeric expression.

Example

Dim MyDate
' MyDate contains the date for May 20, 1963.
MyDate = DateSerial(1963, 5, 20)   ' Return a date.