您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

DATE()

Date from Date, DateTime, or Time

Returns Date from Date, DateTime, or Time.

Sample usage

DATE("4/1/2010") returns 4/1/2010

DATE(TODAY()) returns today's date from a Date value. See also: TODAY()

DATE("4/1/2010 3:14") returns 4/1/2010

DATE(NOW()) returns today's date from a DateTime value. See also: NOW()

DATE("3:14") returns 12/30/1899 (a Time value has no date component, so a default is used).

DATE(TIMENOW()) returns 12/30/1899 (TIMENOW() returns a Time value, which has no date component, so a default is used).

Common problems

DATE("Good morning, Martin!") returns blank because the textual input isn't a recognized temporal type and so cannot be converted.

Syntax

DATE(when)

  • when - A Date, DateTime, or Time value.

Notes

To understand how your mobile device's locale or browser's language setting can impact the Date format, see Considerations for apps using Date, Time, and DateTime formats.

Some constant values, such as "MM/DD/YYYY", are evaluated as a Date value by AppSheet. Similarly, "000:00:00" is evaluated as a Duration value. This doesn't mean your spreadsheet data must use the same formats: the date and time formats in your spreadsheets are determined by the locale/language setting. Column will always be evaluated as the type of column. Additionally, you can convert data, both columns and string literals, to specific types using functions such as DATE(), TIME(), or DATETIME(). 

Because temporal types are Text values with specific formats, any textual value may be supplied to DATE(), but non-temporal values will produce a blank result.

If a Time value is specified, which has no date component, returns a default date of 12/30/1899. If the specified value is not a Date, DateTime, or Time value, returns a blank.

See also

Date and time expressions

Considerations for apps using Date, Time, and DateTime formats

DATETIME()

NOW()

TIME()

TODAY()

Was this helpful?

How can we improve it?
true
Search
Clear search
Close search
Main menu
3111492949662267672
true
Search Help Center
false
true
true
true
false
false
false
false
false
⌂ 换网址