• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server Date!!!!

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if u post a message in this forum, after ur name ,date is there and that date is the server date date not the client date.
can anyone plz tell me ,what is the technique we can use to implement this and how ?if u can help me with regard to servlet,that will be better.
Thanks!
 
R Mutum
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raj:
You will get the server date as long as the code runs on the server. You can put the following code in a jsp page or a servlet:
java.util.Date today = new java.util.Date();
out.println("Today is :" + today);
If you want the client date, you have to use JavaScript or VBscript that runs on the client.
Thanks.
RM

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
i got the date ,actually the problem was with my server only.
i had used the same method,now server is ok.
Thanks, for ur advice.
Raj.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic