ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Name of the month in ASP date?

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> ASP programming
View previous topic :: View next topic  
Author Message
toto



Joined: 20 Oct 2004
Posts: 6

PostPosted: Mon Nov 08, 2004 9:47 am    Post subject: Name of the month in ASP date? Reply with quote

I use the Now function to get the current date in my ASP script, and I want to get the name of the month (January, March, July, etc.). Is there an existing ASP function that does that, or I have to create one myself, depending on the month number?



Thank you all,

ToTo
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Mon Nov 08, 2004 2:02 pm    Post subject: Reply with quote

Hi Toto,

VBScript has date/time function called MonthName, which does exactly what you need. If you pass True as a second parameter to the MonthName function, the month name result will be abbreviated:

Code:

Response.Write MonthName(11) 'Returns November

Response.Write MonthName(11, True) 'Returns Nov




Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> ASP programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial