File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes SimpleDateFormat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "SimpleDateFormat" Watch "SimpleDateFormat" New topic


Garandi Garandi
Ranch Hand

Joined: Jan 07, 2003
Posts: 192
How to create "SimpleDateFormat" to display time in "23:00, 00:00, 01:00, 02:00" etc format.
Thank you in advance
Rodney Woodruff
Ranch Hand

Joined: Dec 04, 2001
Posts: 80
Try this:
new SimpleDateFormat("HH:mm")
This will create a simple date format where the time is a 24 clock which will result in 23:00, 22:00, etc.

Hope This Helps
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63839


[Asking smart questions] [About Bear] [Books by Bear]
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451


I was scared to move it to Cindy's forum.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: SimpleDateFormat
jQuery in Action, 3rd edition