This is a discussion on "Function for Displaying Month" within the Classic ASP section. This forum, and the thread "Function for Displaying Month are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Function for Displaying Month
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Function for Displaying Month
hi everyone!
i want to have a function that will display the month as a string. for example my input is "3/20/2006" the output should be: "Month is Mar" meaning 3 = Mar if 11 = Nov, 12 = Dec .. and so on... can anybody help me to do this? thanks. |
|
|
|
#2
|
|||
|
|||
|
Re: Function for Displaying Month
Hi!
I think in ASP VBScript there is a MonthName function which you can use. First you need to cast the date string into a Date data type, then use the Month function to return the month number from that string, then use MonthName to return the name for that month. I think if you supply True as the second parameter, it will abbreviate the month name for you. So for example:
Hope that helps. Give me a shout if you need any more. |
![]() |
| Tags |
| function, displaying, month |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Just display the month? | Jack Franklin | PHP Forum | 6 | Feb 3rd, 2008 13:24 |
| Problem with displaying random quotes from a function | Z101 | JavaScript Forum | 3 | Dec 7th, 2007 22:34 |
| Site of the Month | craig | Entry, Nominations and Voting | 0 | Oct 18th, 2005 12:19 |
| Website of the Month! | Webforumz Staff | Entry, Nominations and Voting | 6 | Feb 3rd, 2004 13:30 |