Codefixer - ASP tutorials, resources and software
asp.netPRO “Best ASP.NET Host” – DiscountASP.NET
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Tuesday 13 May
MembersPro PayPal - ASP Membership software

asp.netPRO “Best ASP.NET Host” – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

Getting the Name of the Current Month using the MonthName function

Below is of snippet of code that will return the name of the current month using the MonthName VBScript function. In the code below the Month function will return a number between 1 and 12 based on the date function. Next the MonthName function will return the corresponding month name based on the argument between 1 and 12.

<%
Response.Write MonthName(month(date))
%>

Below is our code in action:
May

If you wanted to shorten the month name returned just use the extra parameter below.

<%
Response.Write MonthName(month(date), true)
%>

Below is our code in action:
May



Find out how to get the name of the current day

Other date and time related tutorials:
Read more on the Date, Time and Now VBScript functions
Here's a code snippet to display the day and date (eg. Mon 25 December).
Here's a code snippet to display the day and date with the ordinal suffix (eg. Mon 25th December).
Display the dates and times
Time and Date based greetings
The DateDiff DateAdd and DatePart Functions

LinksPro - Directory  and Link  Management Software




ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software