Weekday: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
Created page with "WEEKDAY(''date''[, ''firstdayofweek'']) '''Description''' WEEKDAY returns an integer representing the day of week from a given date. The required parameter, ''date'', is a ..."
 
Brendon (talk | contribs)
No edit summary
Line 6: Line 6:
WEEKDAY returns an integer representing the day of week from a given date. The required parameter, ''date'', is a numeric expression, a string expression, or any valid expression that can represent a date. The optional parameter, ''firstdayofweek'', is Sunday, if not specified. The return value is an integer from the table below.
WEEKDAY returns an integer representing the day of week from a given date. The required parameter, ''date'', is a numeric expression, a string expression, or any valid expression that can represent a date. The optional parameter, ''firstdayofweek'', is Sunday, if not specified. The return value is an integer from the table below.


For more information about firstdayofweek constants, see "DateDiff".
For more information about firstdayofweek constants, see "Datediff".


'''Table 26: WEEKDAY return values'''
'''Table 26: WEEKDAY return values'''

Revision as of 21:10, 8 July 2012

WEEKDAY(date[, firstdayofweek])

Description


WEEKDAY returns an integer representing the day of week from a given date. The required parameter, date, is a numeric expression, a string expression, or any valid expression that can represent a date. The optional parameter, firstdayofweek, is Sunday, if not specified. The return value is an integer from the table below.

For more information about firstdayofweek constants, see "Datediff".

Table 26: WEEKDAY return values

Constant Value Description
vbSunday 1 Sunday
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday

Example

REM WEEKDAY Example
'WEEKDAY returns day of week as an integer
DIM IndepDay, Birthday
IndepDay = WEEKDAY("July 4, 1776")
PRINT "WEEKDAY of July 4, 1776:", IndepDay
Birthday = WEEKDAY("12/27/70")
PRINT "WEEKDAY of 12/27/70:", Birthday

Output

WEEKDAY of July 4, 1776:   5
WEEKDAY of 12/27/70:1

Related Items

DATEDIFF