Determine if a Given Year is a Leap Year Using the DateSerial Function

Category:
Dates and Math
Type:
Snippets
Difficulty:
Beginning
Author:
Toby Herring

Version Compatibility:

More information:
This function uses the intrinsic DateSerial function. It is up to you to determine if the year is valid for the current calendar. (i.e. prior to the 1500's, there was no such thing as a leap year).

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: