IBM Lotus Symphony


WeekDay Function [Runtime]

Returns the number corresponding to the weekday represented by a serial date number that is generated by the DateSerial or the DateValue function.

Syntax:

WeekDay (Number)

Return value:

Integer

Parameters:

Number: Integer expression that contains the serial date number that is used to calculate the day of the week (1-7).

The following example determines the day of the week using the WeekDay function when you enter a date.

Error Codes

5 Invalid procedure call

Example:

Sub ExampleWeekDay

Dim sDay As String

REM Return and display the day of the week

Select Case WeekDay( Now )

case 1

sDay="Sunday"

case 2

sDay="Monday"

case 3

sDay="Tuesday"

case 4

sDay="Wednesday"

case 5

sDay="Thursday"

case 6

sDay="Friday"

case 7

sDay="Saturday"

End Select

msgbox "" + sDay,64,"Today is"

End Sub


Product Feedback | Additional Documentation | Trademarks