Display Month ASP Script - ASP Web Pro
  Active Server Pages Programming by ASP Web Pro

ASP Scripts

DISPLAY MONTH

There are a number of ways that you can display the month # or month name on your web pages. Here are two quick ways to do it with ASP / VBScript:

<HTML>
<HEAD><TITLE>Printer Friendly Page</TITLE></HEAD>
<BODY>

<% Response.Write DatePart("m", Date()) %>

</BODY>
</HTML>

This script displays the current month number like this: 3

If you want to display the name of a month, you can use this code:

<%
DIM iMonth
iMonth = Month(now)

Response.Write MonthName(iMonth)
%>

Both of these scripts display the month name like this: March

 

< Back to ASP Scripts


 

 

Main Menu
Home
ASP Scripts
ASP Tutorials
JavaScripts
Awards
Contact Us

Email This Page

Other Resources
ASP Web Hosting
Search Engine Submission
Programming Help

 

 

 

Other ASP Web Sites

Site Map

 

Last Updated:
21 March 2010