LibreOffice SymbolLibreOffice Symbol

请支持我们!

DATE

此函数通过指定的年、月、日计算日期并且以单元格的格式显示。单元格默认格式包含的 DATE 函数是日期格式,但是您可以用任何其他的数字格式将其格式化。

语法

DATE(Year; Month; Day)

Year」是一个在 1583 到 9957 之间或者在 0 到 99之间的整数。

批注图标

您可以在「 - LibreOfficeDev - 常规 」中设置从哪一年份开始,将输入的两位数的数字识别为 20xx 年。


Month is an integer indicating the month. A value between 1 and 12.

Day is an integer indicating the day of the month. A value between 1 and 31.

If the values for month and day are out of bounds, they are carried over to the next digit. If you enter =DATE(2000;12;31) the result will be 2000-12-31. If, on the other hand, you enter =DATE(2000;13;31) the result will be 2001-01-31.

提示图标

To avoid ambiguity, always use four digits for years.


批注图标

For Integer arguments, non-integer values are truncated to Integer.


示例

=DATE(00;1;31) yields the date 2000-01-31 written as 01/31/00 if the cell format setting is MM/DD/YY.

Technical information

批注图标

This function is part of the Open Document Format for Office Applications (OpenDocument) standard.