VBScript Month function
VBScript Month()
VBScript Month() function returns a number between 1 and 12. Returned integer number represents the month of the specified date.
Syntax
Month(date)
VBScript Example
<!DOCTYPE html> <html> <body> <script language="vbscript" type="text/vbscript"> document.write(Month("2025-02-11")) document.write(Month("2025-03-11")) document.write(Month("2025-04-11")) document.write(Month("2025-05-11")) </script> </body> </html>
Output :
After running above script in IE we will get following output -
2 3 4 5