DateSerial Function [Runtime]/text/sbasic/shared/03030101.xhpDateSerial functionDateSerial Function [Runtime]Returns a Date value for a specified year, month, or day.Syntax:DateSerial (year, month, day)Return value:DateParameters:Year: Integer expression that indicates a year. All values between 0 and 99 are interpreted as the years 1900-1999. For years that fall outside this range, you must enter all four digits.Month: Integer expression that indicates the month of the specified year. The accepted range is from 1-12.Day: Integer expression that indicates the day of the specified month. The accepted range is from 1-31. No error is returned when you enter a non-existing day for a month shorter than 31 days. see i69463The DateSerial function returns the number of days between December 30,1899 and the given date. You can use this function to calculate the difference between two dates.The DateSerial function returns the data type Variant with VarType 7 (Date). Internally, this value is stored as a Double value, so that when the given date is 1.1.1900, the returned value is 2. Negative values correspond to dates before December 30, 1899 (not inclusive).If a date is defined that lies outside of the accepted range, $[officename] Basic returns an error message.Whereas you define the DateValue function as a string that contains the date, the DateSerial function evaluates each of the parameters (year, month, day) as separate numeric expressions.Example:Sub ExampleDateSerialDim lDate as LongDim sDate as StringlDate = DateSerial(1964, 4, 9)sDate = DateSerial(1964, 4, 9)msgbox lDate REM returns 23476msgbox sDate REM returns 04/09/1964end sub