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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE: DATE function}}
 +
{{Documentation/CalcFunc DateTimeTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_SECOND_function
 +
|NextPage=Documentation/How_Tos/Calc:_DATEVALUE_function
 +
}}__NOTOC__
  
 
== DATE ==
 
== DATE ==
Line 26: Line 31:
 
: returns 8th March 2007 - the date rolls over, as there are only 12 months in a year
 
: returns 8th March 2007 - the date rolls over, as there are only 12 months in a year
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: TIME function|TIME]]
 
* [[Documentation/How_Tos/Calc: TIME function|TIME]]
* [[Documentation/How_Tos/Calc: DATEVALUE function|DATEVALUE]]'''
+
* [[Documentation/How_Tos/Calc: DATEVALUE function|DATEVALUE]]
  
* [[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
+
* [[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: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 +
[[Category: Documentation/Reference/Calc/Date and Time functions]]

Latest revision as of 13:50, 30 January 2024



DATE

returns the date, given the year, month and day of the month.

Syntax:

DATE(year; month; day)

returns the date, expressed as a date-time serial number.
year is an integer between 1583 and 9956 or between 0 and 99; month and day are integers.


If month and day are not within range for a valid date, the date will 'roll over', as shown below.

Example:

DATE(2007; 11; 9)

returns the date 9th November 2007 (as a date-time serial number).

DATE(2007; 12; 32)

returns 1st January 2008 - the date rolls over, as 32nd December 2007 is not valid.

DATE(2004; 3; 0)

returns 29th February 2004 - the date rolls over backwards, as 0th March 2004 is not valid. 2004 was a leap year.

DATE(2006; 15; 8)

returns 8th March 2007 - the date rolls over, as there are only 12 months in a year



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_DATE_function&oldid=259693"
Views
Personal tools
Navigation
Tools