CodingHero CodingHero - 1 year ago 66
Java Question

How to represent time of day (ie. 19:00) in Java?

What's the correct way to represent time of day in Java?

For example: 09:00, 19:30, etc.

Basically this is a time of day not linked to an actual date/day.

Answer Source

You've already tagged this with jodatime.

The Joda Time type for storing a time of day is org.joda.time.LocalTime. See the Joda Time API documentation.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download