How to Calculate Leap Years in Microsoft Access
In this Microsoft Access tutorial, I will show you how to determine whether or not a year is a leap year using the IsDate function and a few other tricks.
Pre-Requisites
Links
Recommended Courses
Methods
- Number of days in a banker's month (30)
- Number of days in the average month (30.4167)
- Number of days in the year (365 or 366)
- Number of days in the current month
Usage
- D: CustomerSince
- Y: Year(D)
- D2: [Y] & "-02-29"
- D2: "2/29/" & Y
- IsLeapYear: IsDate([D2])
- IsLeapYear: IsDate(Year([D]) & "-02-29")
- IsLeapYear: IsDate("2/29/" & Year([D]))
Keywords
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, leap year function, determine whether a year is a leap year or not, Code to calculate a leap year