Showing the first and last day of the month
Use the DateSerial function
Using the Date Serial function, DateSerial(year,month,day), returning the first day of the month is straightforward:
<%
Dim first_day
first_day = DateSerial(Year(Date), Month(Date), 1)
%>
This returns: 01/10/2008
Returning the the last day of the month is the same as returning the day fefore the first day of next month.
<%
Dim last_day
last_day = DateSerial(Year(Date), Month(Date)+1, 1 - 1)
%>
This returns : 31/10/2008
This will work for any month - even February in a leap year!