Page 146 of 346 Start Back Next End ZBasic System Library 134 ZBasic Microcontrollers GetDayOfWeek Type Function returning Byte Invocation GetDayOfWeek() GetDayOfWeek(dayNum) Parameter Method Type Description dayNum ByVal integral The day number to convert to year, month, day. Discussion This routine computes the day of the week corresponding to a day number. If the day number is omitted, the value of Register.RTCDay is used.. A return value of 1 corresponds to Sunday and a value of 7 corresponds to Saturday with the remaining days falling in order in between. There are built-in constants that represent the day numbers as shown in the table below. Day of Week Constants Constant Value zxSunday 1 zxMonday 2 zxTuesday 3 zxWednesday 4 zxThursday 5 zxFriday 6 zxSaturday 7 Note that Register.RTCDay is initialized to zero on power-up or reset. This day number corresponds to Friday, January 1, 1999. Compatibility This function is not available if the RTC is not enabled in your application. See Also GetDate, GetDayNumber, GetDayOfYear