Returns the current date and time as a DateTime value, or creates a year 2000-compliant DateTime value.
Syntax
DATETIME([nYear, nMonth, nDay [, nHours [, nMinutes [, nSeconds]]]])
Returns
DateTime
Arguments
nYear
Specifies the year returned in the year 2000-compliant DateTime value. nYear can be a value from 100 to 9999.
nMonth
Specifies the month returned in the year 2000-compliant DateTime value. nMonth can be a value from 1 to 12.
nDay
Specifies the day returned in the year 2000-compliant DateTime value. nDay can be a value from 1 to 31.
nHours
Specifies the hours returned in the year 2000-compliant DateTime value. nHours can be a value from 0 (midnight) to 23 (11 P.M). Defaults to 0 if omitted.
nMinutes
Specifies the minutes returned in the year 2000-compliant DateTime value. nMinutes can be a value from 0 to 59. Defaults to 0 if omitted.
nSeconds
Specifies the seconds returned in the year 2000-compliant DateTime value. nSeconds can be a value from 0 to 59. Defaults to 0 if omitted.
Remarks
DATETIME( ) returns the current system DateTime if it is issued without the optional arguments.
Include the optional arguments to return a year 2000-compliant DateTime value. For more information about creating year 2000-compliant DateTimes, see Year 2000 Date Support in Chapter 33, “Programming Improvements,” in the Programmer’s Guide.