Wednesday, August 14, 2002 02:45 PM
Can anyone tell me how to print the current system date in java? I tried the methods in the Date class, but no success.
Re: Getting the current date
Friday, August 16, 2002 06:37 PM
Wednesday, August 14, 2002 03:41 PM
You can get the current with the following code
Calendar rightNow = Calendar.getInstance();
Calendar's getInstance method returns a GregorianCalendar object whose time fields have been initialized with the current date and time .