Year

From NSB App Studio
Revision as of 21:26, 8 July 2012 by Brendon (talk | contribs) (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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Related Items

DAY, HOUR, MINUTE, MONTH, NOW, SECOND, TIME