This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 63540


[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
wood burning stoves
subject: SimpleDateFormat
It's not a secret anymore!