View Full Version : Getting the time from the Web Server not the client...
afranka
09-30-2002, 11:29 AM
Hi,
Is there an easy way of getting the time from the server rather than the client?
I'm currently using date.getHours() and date.getMinutes().
This is using IIS on 2000 and Internet Explorer.
Thanks,
Al.
whammy
09-30-2002, 12:20 PM
<% @Language="VBScript" %>
<%
Response.Write(Now() & "<br />")
Response.Write(FormatDateTime(Now(), 0) & "<br />" & vbCrlf) 'Same thing as first line
Response.Write(FormatDateTime(Now(), 1) & "<br />" & vbCrlf)
Response.Write(FormatDateTime(Now(), 2) & "<br />" & vbCrlf)
Response.Write(FormatDateTime(Now(), 3) & "<br />" & vbCrlf)
Response.Write(FormatDateTime(Now(), 4) & "<br />" & vbCrlf)
%>
See also:
http://www.haneng.com/FunctionSearch.asp?s=Date
and
http://www.4guysfromrolla.com/webtech/faq/Intermediate/faq2.shtml
:)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.