Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Current System date & time(URGENT)  RSS feed

 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get System(windows 2000 advanced server or linux or windows NT) current date & time.
Thanks,
Angela
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Angela
java.util.Date today = new java.util.Date();
Calendar today = Calendar.getInstance();
GregorianCalendar today = new GregorianCalendar();
long today_in_millis = System.currentTimeMillis();
Jamie
PS - enough with the URGENTS! this is at least post number 10 with it in your subject! Everyone's posts will be answered in a timely fashion if possible whether they say URGENT or not!
 
Die Fledermaus does not fear such a tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!