setdate()

Examples


The setdate() function creates a date value or modifies an existing date value.

Syntax

setdate(date, month, day, year)

Parameters

date – The date field or variable you want to modify.

month – A new month value for the date, in the range 0 to 12. If set to 0, the current month value of the specified date field won’t be modified. If an attempt is made to enter an out-of-range month, an alert message is automatically displayed to the user.

day – A new day value for the date, in the range 0 to 31. If set to 0, the day value of date won’t be modified. If an attempt is made to enter an out-of-range day for any month, an alert message is automatically displayed to the user.

year – A new 4-digit year value for the date. If set to 0, the year portion of date won’t be modified.

Return value

A date or datetime value


Documentation Feedback