Days in year / Cal accounting for leap year
Comments
-
There are a few ways do do this. The most straightforward being
=YEARDAY(DATE(2019, 12, 31))
This will give you the year day (1 - 365 or 366) for whatever date you specify. In this case it would be the last day of the year.
You can automate the date to look at this year, next year, previous year, etc, you can leave it as manual entry within the formula, or you can use various options for cell referencing to change the entire date or the year, or many other possibilities.
-
Or, if you just want a simple Yes/No (is this year a leap year), divide the current year by 4, then compare that to the integer version.
"Int(currentYear/4)=currentYear/4" should return a True/False matching "Is this year a leap year"
-
Thanks Paul and Corey, based on your input i used the below:
=YEARDAY(DATE(YEAR([Due Date]1), 12, 31)) = 365 or 366
Provides number of days in year, based on the date contained in another cell [Due Date].
Cheers
-
Excellent Use. Happy to help!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives