WeekDay
The WeekDay function is used to determine the day of the week corresponding to a given date. It accepts a date object as input and returns the corresponding day as an integer (0 for Sunday to 6 for Saturday). Robust error handling is in place to ensure reliability, with the function returning NULL if the input is not a date object or if any issues arise during the converting process.
Syntax
WeekDay(Date date)
Example
WeekDay(NowUtc())
WeekDay(Date("09/03/2023")) -> returns '0'
WeekDay(Date("09/15/2023")) -> returns '5'