-
Getting Server Date
How do I get the server date.
When all the code is executed at the server side why doesn't
date() function retrieve the server date.
I had given something like this <%dt=date()%> in my code to
get the server date. so dt has the server date here.
Lemme know the difference please.
Thanks in advance...
-
Hi manjeera
I can't actually remember wether ASP supports the date function in the same way VB uses it, but you can use Now() instead.
Ian
-
Remember to format it if you don't want the time =)
-
as in dt = FormatDateTime(Now(),vbShortDate)
:)
Ian
-
Everything withing ASP script <% %> is server side. IT means that if you use Date or Now you will always get server's date/time.