473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Could we display the server time on the client browser ?

46
Hello Experts.

I wish to set the date and time on my PC which actually i am using as a web server and want users see that date and time when they load my web page and not that is set on their browsers.

Could you help me out please!
Mar 10 '08 #1
5 1525
shweta123
692 Expert 512MB
Hi,

You can use the Now() function for displaying current date and time.
e.g.
Expand|Select|Wrap|Line Numbers
  1.  
  2.    <%
  3.       Dim myDateTime
  4.       myDateTime = Now()
  5.    %> 
  6.  
Now display the above date and time on the page.

Expand|Select|Wrap|Line Numbers
  1.     <div id= "div1"><%=myDateTime></div>
  2.  
Hello Experts.

I wish to set the date and time on my PC which actually i am using as a web server and want users see that date and time when they load my web page and not that is set on their browsers.

Could you help me out please!
Mar 10 '08 #2
giandeo
46
Hi,

You can use the Now() function for displaying current date and time.
e.g.
Expand|Select|Wrap|Line Numbers
  1.  
  2.    <%
  3.       Dim myDateTime
  4.       myDateTime = Now()
  5.    %> 
  6.  
Now display the above date and time on the page.

Expand|Select|Wrap|Line Numbers
  1.     <div id= "div1"><%=myDateTime></div>
  2.  
Hi !

Thank you for you suggestions.
I have tried the code but it does not work.
The date and time set on my server is different from that on the browser of the client.
Anyway, thanks a lot for your help. I will truggling to find out the solution and will definitely publish it here for any one to use in case of need.
Mar 13 '08 #3
jhardman
3,406 Expert 2GB
Hi !

Thank you for you suggestions.
I have tried the code but it does not work.
The date and time set on my server is different from that on the browser of the client.
Anyway, thanks a lot for your help. I will truggling to find out the solution and will definitely publish it here for any one to use in case of need.
Shweta is right. now() returns the server's time, not the client's time.

Jared
Mar 17 '08 #4
hi...
that is what shwetha needs and shwetha please be clear with your question.
As now() is executed on the server, it returns the server time and that is the answer for your question.
Mar 18 '08 #5
giandeo
46
hi...
that is what shwetha needs and shwetha please be clear with your question.
As now() is executed on the server, it returns the server time and that is the answer for your question.
Hello Experts.
Thank you so much for your help.
I tried the code suggested by Shwetha. It works fine.

Thank you .....
Mar 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Rich | last post by:
I'm sure it sounds kinda nutty to display 200 columns and 500,000 rows of data. But I have been pulling data from a Lotus Notes database into Sql Server for a while now, but Lotus Notes is...
12
by: austinJim | last post by:
IIS has quit displaying ASP errors it finds. Errors from SQL Server are displayed as are "page not found" errors but VBScript syntax errors are not. For example, the following code should give the...
2
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a...
4
by: Troy | last post by:
Hello all, I was wondering if there is a way to speed up the rendering of a web page to the client browser... In my case, I am retrieving about 60 - 100 rows of data from an SQL Server and I...
17
by: Zvi Danovich | last post by:
Hi, I am a newby in ASP.NET, and till now wrote only simple "classic" WEB-sites. But - the time came, and now I need that: 1. Server will "listen" for some events on its local machine 2....
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
5
by: Homa | last post by:
Hi all, Can anyone give me some links about how to do an async web service call from aspx and display a temperary page before the web service returns? Thanks, Homa Wong
6
by: Marc | last post by:
How could I directly trigger a very simple on localhost and a known port listening server from my internet browser client? Local host means the little server would be running on the client machine,...
6
by: =?Utf-8?B?Wm9vZG9y?= | last post by:
I have a ClickOnce application that uses web services. This works from every machine we can test it on; however, a customer has a laptop that fails with an exception (relevant portion of stack...
2
by: H. Rodriguez | last post by:
Hello, I would like to be able to open a new IE window on the client side and display a PDF document in the new window. Many tutorial sites that I have checked suggest opening a new IE window...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.