jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Format hour and minute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Format hour and minute" Watch "Format hour and minute" New topic

Format hour and minute

Manuel Leiria
Ranch Hand

Joined: Jul 13, 2007
Posts: 171

I have,

which give me something like this: 3:44
but I want to get 15:44
What should I do?

thanks in advance,

Manuel Leiria<br /> <br />--------------<br />Peace cannot be kept by force; it can only be achieved by understanding. <br /> Albert Einstein
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63348

Check out java.text.SimpleDateFormat

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44515
Or go through the Calendar class; there is HOUR and HOUR_OF_DAY; that might help you.
Manuel Leiria
Ranch Hand

Joined: Jul 13, 2007
Posts: 171
Got it!

I agree. Here's the link: http://aspose.com/file-tools
subject: Format hour and minute
It's not a secret anymore!