int = EncodeDate(nYear,nMonth,nDay)
This macro function calculates a western date from 3 integer literals or expressions representing the year, month and day.
nManOnTheMoon = EncodeDate(1969,7,21)
nBirthdayThisYear = EncodeDate(YearOf(Today()), nBirthMonth, nBirthDay)
You will usually use dates obtained directly from other functions or system variables in your code, so you will rarely need to use this function, unless you want to create a specific date.
See also: EncodeJewishDate, FirstDateOfMonth, LastDateOfMonth, MoveMonths, WeekStartOfMonth.
Topic 108268, last updated on 10-Oct-2026