WeekDay Function

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

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


Tan (āļ…āļ‚āļšāļē)

āļ†āļ´āˇƒāˇ” āļŊāļļāˇāļ¯āˇ™āļą āļ…āļœāļē:

Integer

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

Number: āļ­āļ­āˇŠāļ´āļģ āļœāļĢāļą āļœāļĢāļąāļē āļšāˇ’āļģāˇ“āļ¸āļ§ āļēāˇœāļ¯āˇ āļœāļąāˇŠāļąāˇ āļ…āļąāˇ”āļšāļ¸ āļšāˇāļŊ āļ…āļ‚āļšāļē āļ…āļŠāļ‚āļœāˇ” āˇƒāļ‚āļ›āˇŠâ€āļēāˇ āļ´āˇŠâ€āļģāļšāˇāˇāļąāļē.

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

Error codes:

5 Invalid procedure call

āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


Sub ExampleWeekDay
Dim sDay As String
' 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

Please support us!