Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 how to get the date
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

crash
Advanced Member

Netherlands
2064 Posts

Posted - 19 May 2002 :  07:23:44  Show Profile  Visit crash's Homepage
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  Show Profile
this should do it

<%Response.Write(FormatDateTime(Now(),1) & "<br>")%>

not tried it tho

.:: Brother Beyond::.
Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 19 May 2002 :  09:07:16  Show Profile  Visit crash's Homepage
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
Go to Top of Page

_barbara
Junior Member

Germany
123 Posts

Posted - 19 May 2002 :  09:17:41  Show Profile
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

Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 19 May 2002 :  09:27:03  Show Profile  Visit crash's Homepage
that's it! thank you _barbara!!



Crash's Site | Crash is from
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 19 May 2002 :  09:32:21  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 19 May 2002 :  09:34:27  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

DaveLloyd
Starting Member

United Kingdom
29 Posts

Posted - 19 May 2002 :  10:06:12  Show Profile
I just put this code into "inc_top.asp" where I want the date to appear:-

<% =monthname(month(now)) %>/<% =year(now) %>

David Lloyd

Go to Top of Page

_barbara
Junior Member

Germany
123 Posts

Posted - 19 May 2002 :  10:19:23  Show Profile
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
Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 19 May 2002 :  10:31:46  Show Profile  Visit crash's Homepage
i really appreciate the devotion here guys and girls! thanks!



Crash's Site | Crash is from
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.53 seconds. Powered By: Snitz Forums 2000 Version 3.4.07