Use this function to get the number of days in the specified year.
DaysInYear (Year)
Parameter |
Description |
Year |
Enter the year. The default is the current year. |
This function returns 365 or 366, depending on whether the year parameter is a leap year. This function is typically used with the Year function. The Year function extracts the year number from a given date.
Here are some examples:
(Assume the current date is 07/01/2008.)
Function |
Result |
Explanation |
DaysInYear ( ) |
366 |
2008 is a leap year, therefore the returned value is 366. |
DaysInYear (09) |
365 |
The year 2009 is not a leap year and has 365 days. |
DaysInYear (Year("2009/09/09", "34")) |
365 |
First the Year function extracts the year number (2009) from the given date using the format specified. The DaysInYear function then determines that the given year has 365 days and returns the integer 365. |
© Copyright 2012, Oracle and/or its affiliates. All rights reserved. Legal notices.