Previous Topic

Next Topic

MakeDate - MaxBasic Function

MakeDate(Year: Number, Month: Number, Day: Number): Date

Returns a valid date with the Year, Month and Day provided.

MakeDate function syntax has these named arguments:

Parameter

Description

Year

Required. The year of the date. Must be between 1000 and 9999.

Month

Required. The month of the date. If this is negative, a wrap around will result.

Day

Required. The day of the date. Must be a positive integer, if a day greater than number of days in the month is passed the nearest day is returned.

Sample code:

lDate = MakeDate(2025, 2, 15)

Print "Date = " & FormatDateTime(lDate, "dd/mm/yyyy")

See Also

Date Functions

Book Contents

Book Index