View previous topic :: View next topic |
Author |
Message |
toto
Joined: 20 Oct 2004 Posts: 6
|
Posted: Mon Nov 08, 2004 9:47 am Post subject: Name of the month in ASP date? |
|
|
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 |
|
|
paul
Joined: 11 Oct 2004 Posts: 128
|
Posted: Mon Nov 08, 2004 2:02 pm Post subject: |
|
|
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 |
|
|
|
|
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
|