Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

year - Year of date

Syntax

Year = year(Date)
Year = year(Date, F)

Description

Year = year(Date) returns the year of a serial date number or a date string.

Year = year(Date, F) returns the day of the of the month, given a serial date number or date string, in a specified date format.

Examples

Year = year(731798.776)

or

Year = year('05-Aug-2003')

returns

 Year =

        2003

You can also use the F argument to designate a country-specific date format:

Year = year('2003/08/05','yyyy/mm/dd')

returns Year = 2003

See Also

datevec, day, month, yeardays

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS