Tuesday, 29 November 2011

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:


Printer Friendly Page


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




This script displays the current month number like this: 11

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: November

No comments:

Post a Comment