MonthName Function

Tips >>ASP Functions


The MonthName function returns the name of the specified month. Getting the name of the current month using the MonthName function. In the code below the Month function will return a number between 1 and 12 based on the date function. The MonthName consists numeric designation of the month. For example, January is 1, February is 2, and so on.

Note :- A Boolean value that indicates if the month name is to be abbreviated. If omitted, the default is False, which means that the month name is not abbreviated. MonthName returns a string indicating the specified month.

The Syntax of the MonthName function is :-

MonthName(month[,abbreviate])

Example#1 :-

Code :-
document.write(MonthName(8))
Output :-
August

Example#2 :-

Code :-
document.write(MonthName(8,true))
Output :-
Aug

Example#3 :-

Code :-
<%
Response.Write MonthName(MonthName(5))
%>
Output :-
May

Example#4 :-

Code :-
<%
Response.Write MonthName(MonthName(5,true))
%>
Output :-

May

Example#5 :-

Code :-
<%
Response.Write MonthName(MonthName(10,true))
%>
Output :-

October

Example#6 :-

Code :-
<%
=MonthName(6)
%>
Output :-
June

 
News / Updates New version of cheque printing software is up. Can configure date in box. http://VirtualSplat.com/cp6.exe
E-mail : sales at virtualsplat dot com
Phone : +91 022 28067978