This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes dateformatter... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "dateformatter..." Watch "dateformatter..." New topic
Author

dateformatter...

Stacy Lee
Greenhorn

Joined: Jun 09, 2001
Posts: 12
a given long millisecond value...
how can i get the date and time
like 07-12-01 (date) and 12:00:00 (time)
thank u very much....
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You're looking for java.util.Date to cretae a Date from the miliseconds, then jvaa.text.SimpleDateFormat (extends java.text.DateFormat so you can use its functionality as well)
Dave.
 
Consider Paul's rocket mass heater.
 
subject: dateformatter...
 
Similar Threads
Unable to fetch records by using 'where' clause for a date type field in sql
how to get the response time
Validate date and time in locat time.
Date comparision in SQL from timestamp
Saving system date