Author |
Topic |
|
crash
Advanced Member
Netherlands
2064 Posts |
Posted - 19 May 2002 : 07:23:44
|
i feel a tad silly asking for this... maybe i'm not very awake or whatever, but no matter what i try, i cannot seem to get the present month to display...
i tried several things and got as far as displaying the correct date including the present time, so i am on the right track i believe.
but i just want to display May 2002. can someone tell me which variable i need to call?
Crash's Site | Crash is from
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 19 May 2002 : 08:42:05
|
this should do it
<%Response.Write(FormatDateTime(Now(),1) & "<br>")%>
not tried it tho
.:: Brother Beyond::. |
|
|
crash
Advanced Member
Netherlands
2064 Posts |
Posted - 19 May 2002 : 09:07:16
|
Sunday, May 19, 2002 is what it does. close, but not the exact thing i'm looking for... thanks anyway!
i am looking for functions that result in this:
Month: May
Year: 2002
Crash's Site | Crash is from
|
|
|
_barbara
Junior Member
Germany
123 Posts |
Posted - 19 May 2002 : 09:17:41
|
quote:
this should do it
<%Response.Write(FormatDateTime(Now(),1) & "<br>")%>
not quite - this gives the whole date, e.g. Sunday, May 19, 2002
To get only monthname and year, try this:
Response.Write(Monthname(Month(Now())) & " " & Year(Now()) & "<br>")
Barbara
|
|
|
crash
Advanced Member
Netherlands
2064 Posts |
Posted - 19 May 2002 : 09:27:03
|
that's it! thank you _barbara!!
Crash's Site | Crash is from
|
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 19 May 2002 : 09:32:21
|
Hi
This should do what you are looking for. You need the DateToStr function from inc_functions.asp for this to work.
intMonth = DatePart("m", Date) intYear = Left(DateToStr(Date),4)
Response.Write MonthName(intMonth) & " " & intYear & "<br>"
Master AO =========== FR Portal | FR Portal Forums |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 19 May 2002 : 09:34:27
|
quote:
Hi
Seems Barbara beat me with a better way than mine.
This should do what you are looking for. You need the DateToStr function from inc_functions.asp for this to work.
intMonth = DatePart("m", Date) intYear = Left(DateToStr(Date),4)
Response.Write MonthName(intMonth) & " " & intYear & "<br>"
Master AO =========== FR Portal | FR Portal Forums
Master AO =========== FR Portal | FR Portal Forums |
|
|
DaveLloyd
Starting Member
United Kingdom
29 Posts |
Posted - 19 May 2002 : 10:06:12
|
I just put this code into "inc_top.asp" where I want the date to appear:-
<% =monthname(month(now)) %>/<% =year(now) %>
David Lloyd
|
|
|
_barbara
Junior Member
Germany
123 Posts |
Posted - 19 May 2002 : 10:19:23
|
quote:
Seems Barbara beat me with a better way than mine.
didn't want to beat you - I hate fights
Edited by - _barbara on 19 May 2002 10:20:18 |
|
|
crash
Advanced Member
Netherlands
2064 Posts |
Posted - 19 May 2002 : 10:31:46
|
i really appreciate the devotion here guys and girls! thanks!
Crash's Site | Crash is from
|
|
|
|
Topic |
|