Purpose
Returns an integer from 1 to 7, indicating the weekday of a specified date. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Weekday( date_expr )
date_expr is a date expression.
Return Value
SmallInt value from 1 to 7, inclusive; 1 represents Sunday.
Description
The Weekday() function returns an integer representing the day-of-the-week component (one to seven) of the specified date.
The Weekday() function only works for dates on or after January 1, in the year 100. If date_expr specifies a date before the year 100, the Weekday() function returns a value of zero.
Example
If Weekday( CurDate() ) = 6 Then
'
' then the date is a Friday
'
End If
See Also:
CurDate() function, Day() function, Month() function, Year() function