| Author |
How can we get current time
|
Ranga Reddy shreya
Ranch Hand
Joined: Oct 20, 2004
Posts: 30
|
|
How can we get current time and date on webpage through jsp or html. Thanks
|
Enjoy life .
|
 |
Sonny Gill
Ranch Hand
Joined: Feb 02, 2002
Posts: 1211
|
|
Use JavaScript Date object, or java.util.Date, and java.text.SimpleDateFormat to create it on server, and send as plain HTML.
|
The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
|
 |
Shailesh Chandra
Ranch Hand
Joined: Aug 13, 2004
Posts: 1076
|
|
I will not recommend using javascript date because it depends on client machine. user time of Web server/Database server
|
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
|
 |
Fisher Daniel
Ranch Hand
Joined: Sep 14, 2001
Posts: 582
|
|
Hi, I think it is better to get value of current time from server's current time. You can get using GregorianCalendar or System.currentTimeMillis... Hope this helps... thanks daniel
|
 |
Ranga Reddy shreya
Ranch Hand
Joined: Oct 20, 2004
Posts: 30
|
|
|
thnaks
|
 |
 |
|
|
subject: How can we get current time
|
|
|