wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Current System date & time(URGENT) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Current System date & time(URGENT)" Watch "Current System date & time(URGENT)" New topic
Author

Current System date & time(URGENT)

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
How to get System(windows 2000 advanced server or linux or windows NT) current date & time.
Thanks,
Angela
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Current System date & time(URGENT)
 
Similar Threads
Looping accoridng to time
Java Data and time pattern
JSP is recompiling on every request
Getting the date
How do demo softwares expire?