Difference between revisions of "Documentation/How Tos/Calc: WEEKDAY function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Example:)
(See also:)
Line 42: Line 42:
 
'''[[Documentation/How_Tos/Calc: MINUTE function|MINUTE]]''',
 
'''[[Documentation/How_Tos/Calc: MINUTE function|MINUTE]]''',
 
'''[[Documentation/How_Tos/Calc: SECOND function|SECOND]]'''
 
'''[[Documentation/How_Tos/Calc: SECOND function|SECOND]]'''
 +
 +
'''[[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
  
 
'''[[Documentation/How_Tos/Calc: Date & Time functions|Date & Time functions]]'''
 
'''[[Documentation/How_Tos/Calc: Date & Time functions|Date & Time functions]]'''
  
'''[[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
+
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
 +
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]

Revision as of 07:09, 12 September 2008


WEEKDAY

Returns the day of the week for a given date.

Syntax:

WEEKDAY(date; type)

returns the day of the week that date falls on, as a number.
The number returned depends on type, as follows:
day of the week type=1 type=2 type=3
Sunday 1 7 6
Monday 2 1 0
Tuesday 3 2 1
Wednesday 4 3 2
Thursday 5 4 3
Friday 6 5 4
Saturday 7 6 5
If type is omitted, it is assumed to be 1.

Example:

WEEKDAY("2008-06-14"; 1)

returns 7. 14Jun08 falls on a Saturday.

See also:

YEAR, MONTH, DAY, HOUR, MINUTE, SECOND

Date & Time overview

Date & Time functions

Functions listed alphabetically, Functions listed by category

Personal tools