YEAR()

Year from Date, DateTime, or Time

Returns the year ( Number  value) from  Date DateTime , or  Time . If a  Time  value is specified, which has no year component, returns a default year. If the specified value is not a  Date DateTime , or  Time  value, returns a blank.

Sample usage

YEAR(TODAY()) returns this year. See also:  TODAY()

YEAR(TODAY()) + 1 returns next year.

YEAR(TODAY() + 365) returns next year (unless today is January 1 of a leap year).

YEAR(TODAY()) - 1 returns last year.

YEAR([Birthday]) returns someone's birth year.

Syntax

YEAR( when )

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

Note

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()

See also

Date and time expressions

DAY()

MONTH()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
15906125138692941697
true
Search Help Center
true
true
true
false
false
false
false
Create a Mobile Website
View Site in Mobile | Classic
Share by: