Year: Difference between revisions
Jump to navigation
Jump to search
(Created page with "YEAR(''date'') '''Description''' YEAR returns an integer, that represents the year of the given date.The required parameter, ''date'', can be any expression that represents ...") |
No edit summary |
||
Line 1: | Line 1: | ||
Year(''date'') | |||
== Description == | |||
Year returns an integer, that represents the year of the given date.The required parameter, ''date'', can be any expression that represents a date. | |||
== Example == | |||
<pre> | <pre> | ||
Rem Year Example | |||
' | 'Year returns year of a date as an integer | ||
Dim IndepYear, Birthyear | |||
IndepYear = | IndepYear = Year("July 4, 1776") | ||
Print "YEAR of July 4, 1776:", IndepYear | |||
Birthyear = | Birthyear = Year("12/27/70") | ||
Print "YEAR of 12/27/70:", Birthyear | |||
</pre> | </pre> | ||
== Output == | |||
<pre> | <pre> | ||
Year of July 4, 1776: 1776 | |||
Year of 12/27/70: 1970 | |||
</pre> | </pre> | ||
== Related Items == | |||
[[day|DAY]], [[hour|HOUR]], [[minute|MINUTE]], [[month|MONTH]], [[now|NOW]], [[second|SECOND]], [[time|TIME]] | [[day|DAY]], [[hour|HOUR]], [[minute|MINUTE]], [[month|MONTH]], [[now|NOW]], [[second|SECOND]], [[time|TIME]] | ||
[[Category:Language Reference]] |
Revision as of 04:30, 17 August 2012
Year(date)
Description
Year returns an integer, that represents the year of the given date.The required parameter, date, can be any expression that represents a date.
Example
Rem Year Example 'Year returns year of a date as an integer Dim IndepYear, Birthyear IndepYear = Year("July 4, 1776") Print "YEAR of July 4, 1776:", IndepYear Birthyear = Year("12/27/70") Print "YEAR of 12/27/70:", Birthyear
Output
Year of July 4, 1776: 1776 Year of 12/27/70: 1970