Navigation:  Appendices > Macro Language > Built-in Functions > All Functions (Alphabetical) >


Previous pageReturn to chapter overviewNext page

int = EncodeDate(nYear,nMonth,nDay)


This macro function builds a date from 3 integer expressions representing the year, month and day.


nManOnTheMoon = EncodeDate(1969,7,21)

nBirthdayThisYear = EncodeDate(YearOf(Today()), nBirthMonth, nBirthDay)

nFirstDayCentury = EncodeDate(100*(nYear div 100), 1,1)


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. Even then, there are much more specialized date building functions (see below) which you should be familiar with before deciding you need to use the EncodeDate function. This may save you the effort of re-inventing the wheel.


See also : EncodeJewishDate, FirstDateOfMonth, LastDateOfMonth, MoveMonths, WeekStartOfMonth.

Topic 108268 updated on 01-Nov-2016.
Topic URL: http://www.qppstudio.net/webhelp/index.html?encodedate.htm