| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Toolbox |
| Contents | Index |
| Learn more about Financial Toolbox |
DayMonth = eomdate(Date) DayMonth = eomdate(Year, Month)
DayMonth = eomdate(Date) returns the serial date number of the last date of the month for the given Date. Enter Date as a four-digit integer or a date string.
DayMonth = eomdate(Year, Month) returns the serial date number of the last date of the month for the given year and month. Enter Year as a four-digit integer; enter Month as an integer from 1 through 12.
Either input argument can contain multiple values, but if so, the other input must contain the same number of values or a single value that applies to all. For example, if Year is a 1-by-n vector of integers, then Month must be a 1-by-n vector of integers or a single integer. DayMonth is then a 1-by-n vector of date numbers.
Use the function datestr to convert serial date numbers to formatted date strings or datenum to convert date and time to serial date number.
DayMonth = eomdate(2001, 2)
DayMonth =
730910
datestr(DayMonth)
ans =
28-Feb-2001
Year = [2002 2003 2004 2005];
DayMonth = eomdate(Year, 2)
DayMonth =
731275 731640 732006 732371
datestr(DayMonth)
ans =
28-Feb-2002
28-Feb-2003
29-Feb-2004
28-Feb-2005
day, eomday, lbusdate, month, year
![]() | end | eomday | ![]() |
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 |