WeekDay Function (BASIC)

DateSerial λ˜λŠ” DateValue ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ μƒμ„±ν•œ 연속 λ‚ μ§œ λ²ˆν˜Έκ°€ λ‚˜νƒ€λ‚΄λŠ” μš”μΌμ— ν•΄λ‹Ήν•˜λŠ” 숫자λ₯Ό κ΅¬ν•©λ‹ˆλ‹€.

Syntax:


WeekDay (Number)

Return value:

Integer

Parameters:

Number: μš”μΌ(1-7)을 κ³„μ‚°ν•˜λŠ” 데 μ‚¬μš©λ˜λŠ” 연속 λ‚ μ§œ 번호λ₯Ό ν¬ν•¨ν•˜λŠ” μ •μˆ˜ μ‹μž…λ‹ˆλ‹€.

λ‹€μŒμ€ λ‚ μ§œλ₯Ό μž…λ ₯ν•  λ•Œ WeekDay ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ μš”μΌμ„ ν™•μΈν•˜λŠ” μ˜ˆμž…λ‹ˆλ‹€.

Error codes:

5 잘λͺ»λœ ν”„λ‘œμ‹œμ € ν˜ΈμΆœμž…λ‹ˆλ‹€.

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

Please support us!