Difference between revisions of "Manuals/calci/YEAR"
Jump to navigation
Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="2SpaceContent" align="left"><div class="ZEditBox" align=...") |
|||
Line 1: | Line 1: | ||
− | + | =YEAR(SN)= | |
− | + | where, | |
+ | *<math>SN</math> represents a date from which year has to be displayed, | ||
− | + | YEAR(SN) displays the year corresponding to a date. | |
− | |||
− | |||
− | + | == Description == | |
− | + | YEAR(SN) | |
− | |||
− | |||
− | |||
− | |||
− | + | e.g. YEAR(DATE(1980,10,25)) returns '''1980''' as a result. | |
− | < | + | *YEAR function returns the year from the date mentioned. Result is an integer value in the range 1900 to 9999. |
− | + | *<math>SN</math> is a date value to be entered either in 'date format' or 'dates returned using formulas'. | |
− | < | + | *If <math>SN</math> values are invalid, Calci displays #N/A error message. |
− | + | == Examples == | |
− | + | Consider the following example that shows the use of YEAR function: | |
− | |||
− | |||
− | |||
− | |||
− | + | <div id="2SpaceContent" class="zcontent" align="left"> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <div id=" | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
+ | | class=" " | 10/8/2014 | ||
+ | | class=" " | 15-February-2010 | ||
| class=" " | | | class=" " | | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | | |
− | + | | class=" " | | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | class=" " | | ||
− | | class=" " | | ||
| class=" " | | | class=" " | | ||
|} | |} | ||
− | + | =YEAR(A1): Displays the year value for date mentioned in A1. Displays '''2014''' as a result. | |
− | + | =YEAR(B1): Displays the year value for date mentioned in B1. Displays '''2010''' as a result. | |
− | + | =YEAR(DATE(99,10,28)) : Displays the year value for date mentioned. Displays '''1999''' as a result. | |
+ | |||
+ | == See Also == | ||
− | + | *[[Manuals/calci/YEARFRAC | YEARFRAC]] | |
+ | *[[Manuals/calci/DAY | DAY]] | ||
+ | *[[Manuals/calci/MONTH | MONTH]] | ||
− | + | == References == | |
− | + | *[http://en.wikipedia.org/wiki/Date_format_by_country Date Formats] | |
− | + | *[http://en.wikipedia.org/wiki/Calendar_date Date] | |
+ | *[http://en.wikipedia.org/wiki/Calendar_year Calendar Year] |
Revision as of 16:42, 5 February 2014
YEAR(SN)
where,
- represents a date from which year has to be displayed,
YEAR(SN) displays the year corresponding to a date.
Description
YEAR(SN)
e.g. YEAR(DATE(1980,10,25)) returns 1980 as a result.
- YEAR function returns the year from the date mentioned. Result is an integer value in the range 1900 to 9999.
- is a date value to be entered either in 'date format' or 'dates returned using formulas'.
- If values are invalid, Calci displays #N/A error message.
Examples
Consider the following example that shows the use of YEAR function:
10/8/2014 | 15-February-2010 | |
=YEAR(A1): Displays the year value for date mentioned in A1. Displays 2014 as a result. =YEAR(B1): Displays the year value for date mentioned in B1. Displays 2010 as a result. =YEAR(DATE(99,10,28)) : Displays the year value for date mentioned. Displays 1999 as a result.