Close
jGuru Forums
Posted By: sachu_mexon Posted On: Tuesday, June 18, 2002 10:53 AM
can anyone tell me how to do this.
what i want to do is:
i want to get the current date and time
for eg: i want to have
061820021:46:42
stored to a string datetime. so that each time i display datetime , i get the current date and time. here it is
mmddyyyyhh:mm:ss
thankyou
Re: getting the current date and time
Posted By: Rob_Eamon Posted On: Wednesday, August 28, 2002 08:35 PM
java.util.Date now = new java.util.Date();java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMddyyyy:mm:ss");String datetimeStr = sdf.format(now);
Posted By: Scott_Yaung Posted On: Sunday, July 21, 2002 01:31 PM