If you need to get the last day in a month in VBScript you can use the following function.
Source Code
1
2
3
4
5
6
7
8
9
10
11
12
13
' @Author - Alexander Bolte' @ChnageDate - 2015-03-11' @Description - Returns a Date representing the last day of a given month.' @Param monthNumber - a 1 based Integer representing a month.' @Returns a Date representing the last day of a given month.FunctiongetLastDayInMonth(monthNumber)' As DateDimlastDay' As DatelastDay=Now()lastDay=DateSerial(year(lastDay),monthNumber+1,0)getLastDayInMonth=lastDayEndFunction
References
I found this little trick on a Microsoft page, which also describes how to calculate several dates depending on the current date.