This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
YEAR
Daniel Gorman edited this page May 22, 2019
·
4 revisions
YEAR
takes a date and returns a four-digit integer representing the year on which it falls.
YEAR(arg1)
-
arg1
is a date object or a function that resolves to a date object
To get the current year, we can call YEAR
with an argument of a date object.
For instance, if we want to find the current year, we can call YEAR(TODAY())
, with the TODAY
function being the argument. This returns a four-digit integer representing the current year.
If the current date were April 27th, 2099, YEAR(TODAY())
would return 2099
.