Monday, January 18, 2010

DateSerial - To Set a Certain Date

To set a certain date and assign it to a variable, u might need this.

Example: Set and assign a variable with the first day of certain month, certain year



Dim dtDate As Date

Dim intYear, intMonth


intYear = 1986
intMonth = 12
dtDate = DateSerial(dtYear, dtMonth, 26)




Now, your dtDate with hold the date of 26th December 1986.

No comments:

Post a Comment