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


Previous pageReturn to chapter overviewNext page

bool = IsWeekend(nDate)


This macro function returns true if nDate corresponds to a Saturday or Sunday, and false otherwise. Remember that the dates nDate is an integer type date. If you wish to construct a date from a day-month-year triplet, you should use the EncodeDate function.


This function uses the "western" weekend. If you wish determine if a date is one of many possible weekdays, you should use the WeekdayOf function and the in operator :


bRESULT = WeekdayOf(nDate) in [5,6]

bRESULT = WeekdayOf(nDate) in [1..4]


The 2 above examples will determine respectively if nDate is a Friday or Saturday and if nDate is Monday to Thursday.


See also : IsDayOfWeek, IsMonday, IsSunday.

Topic 110077 updated on 05-Mar-02.
Topic URL: