In an active server page does Date give the system date on the client or on the file server?
If it the date on the client, could anyone let me know how to retrieve the system date on the server?
Thanks.
Printable View
In an active server page does Date give the system date on the client or on the file server?
If it the date on the client, could anyone let me know how to retrieve the system date on the server?
Thanks.
It depends on whether Date is in a client side script or a server side script. It is the client date if it is in client side script, and server if it is in server side script. If you need the server date on the client side you can do a response write within server side script to create client side script and assign the date to a variable:
You can also declare the variable in an existing script and just use the 3rd Response.Write within the client script (don't forget the <% %> ) to assign the value. It will be written into the page as a hard-coded value.Code:<%
Response.Write "<SCRIPT language=VBScript>" & vbCrLf
Response.Write "Dim dteDate" & vbCrLf
Response.Write "dteDate = " & Date & vbCrLf
Response.Write "</SCRIPT>"
%>
Hope this helps
Thanks for the reply.
How would I get the client date in a Server side script?