Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Convert Military Time

Started 1 year, 11 months ago by blackmage
I'm making an application in which i need to convert military time like 17:34 into standard time, 9:34. What is an easy way I can accomplish this. Thanks.
Site: Sun Forums  Sun Forums - site profile
Forum: Java Programming   Java Programming   - forum profile
Total authors: 9 authors
Total thread posts: 15 posts
Thread activity: no new posts during last week
Domain info for: sun.com

Other posts in this thread:

cotton.m replied 1 year, 11 months ago
Try using the java.iphone.util package.

kajbj replied 1 year, 11 months ago
blackmage wrote: I'm making an application in which i need to convert military time like 17:34 into standard time, 9:34. You do know that 17:34 isn't 9:34?

Djaunl replied 1 year, 11 months ago
Do you want to put the conversion code on a PS3 or blu-ray player?

cotton.m replied 1 year, 11 months ago
At any rate while I am sure you will instead use some other "solution" including a a custom class loader and for some reason Blu-ray the correct answer is as follows. You won't be "converting" any time at all. A date is a date is a date. What you want to do is change the display formatting of the date. For this operation use the java.text.SimpleDateFormat class. You can also use this class ...

masijade. replied 1 year, 11 months ago
SimpleDateFormat Edit: Must have hit reply just as cotton was hitting post. ;-)

Djaunl replied 1 year, 11 months ago
cotton.m wrote: At any rate while I am sure you will instead use some other "solution" including a a custom class loader and for some reason Blu-ray the correct answer is as follows. You won't be "converting" any time at all. A date is a date is a date. What you want to do is change the display formatting of the date. For this operation use the java.text.SimpleDateFormat class. You can ...

cotton.m replied 1 year, 11 months ago
Djaunl wrote: cotton.m wrote: At any rate while I am sure you will instead use some other "solution" including a a custom class loader and for some reason Blu-ray the correct answer is as follows. You won't be "converting" any time at all. A date is a date is a date. What you want to do is change the display formatting of the date. For this operation use the java.text....

blackmage replied 1 year, 11 months ago
Funny Jokes, hahahahaha. I'm glad all the kids are still here and playin around. SimpleDataFormat. So I would do something like SimpleDateFormat hour = new SimpleDateFormat(hh:MM:ss); But the military time is a string, and hour.format() has the parameters of a Data Object and and Object object, so how do I turn 19:34 into a date?

yawmark replied 1 year, 11 months ago
http://java.sun.com/docs/books/tutorial/i18n/form at/simpleDateFormat.html ~

cotton.m replied 1 year, 11 months ago
blackmage wrote: Funny Jokes, hahahahaha. I'm glad all the kids are still here and playin around. SimpleDataFormat. So I would do something like SimpleDateFormat hour = new SimpleDateFormat(hh:MM:ss); But the military time is a string, and hour.format() has the parameters of a Data Object and and Object object, so how do I turn 19:34 into a date? RTFAPI! There is a method ...

 

Top contributing authors

Name
Posts
cotton.m
4
user's latest post:
Convert Military Time
Published (2008-01-07 05:39:00)
blackmage wrote: Funny Jokes, hahahahaha. I'm glad all the kids are still here and playin around. SimpleDataFormat. So I would do something like SimpleDateFormat hour = new SimpleDateFormat(hh:MM:ss); But the military time is a string, and hour.format() has the parameters of a Data Object and and Object object, so how do I turn 19:34 into a date? RTFAPI! There is a method named parse. There is another hour type of HH.
Djaunl
3
user's latest post:
Convert Military Time
Published (2008-01-07 05:48:00)
cotton.m wrote: See reply #1. I'm of the mentality that beating a dead horse is never wrong.
blackmage
2
user's latest post:
Convert Military Time
Published (2008-01-07 05:38:00)
Funny Jokes, hahahahaha. I'm glad all the kids are still here and playin around. SimpleDataFormat. So I would do something like SimpleDateFormat hour = new SimpleDateFormat(hh:MM:ss); But the military time is a string, and hour.format() has the parameters of a Data Object and and Object object, so how do I turn 19:34 into a date?
kajbj
1
user's latest post:
Convert Military Time
Published (2008-01-07 05:31:00)
blackmage wrote: I'm making an application in which i need to convert military time like 17:34 into standard time, 9:34. You do know that 17:34 isn't 9:34?
masijade.
1
user's latest post:
Convert Military Time
Published (2008-01-07 05:33:00)
SimpleDateFormat Edit: Must have hit reply just as cotton was hitting post. ;-)
yawmark
1
user's latest post:
Convert Military Time
Published (2008-01-07 05:39:00)
http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html ~
prometheuzz
1
user's latest post:
Convert Military Time
Published (2008-01-07 05:40:00)
blackmage wrote: Funny Jokes, hahahahaha. I'm glad all the kids are still here and playin around. SimpleDataFormat. So I would do something like SimpleDateFormat hour = new SimpleDateFormat(hh:MM:ss); But the military time is a string, and hour.format() has the parameters of a Data Object and and Object object, so how do I turn 19:34 into a date? Re-read the last sentence from reply #4...
jwenting
1
user's latest post:
Convert Military Time
Published (2008-01-07 05:46:00)
blackmage wrote: I'm making an application in which i need to convert military time like 17:34 into standard time, 9:34. What is an easy way I can accomplish this. 17:34 IS standard :) And it's NEVER 9:34, unless the two are based on different timezones. 17:34 in any timezone is (to use US civy notation) 5:34PM.
georgemc
1
user's latest post:
Convert Military Time
Published (2008-01-07 05:48:00)
Classloaders?

Related threads on "Sun Forums":

Related threads on other sites:

Thread profile page for "Convert Military Time" on http://www.sun.com. This report page is a snippet summary view from a single thread "Convert Military Time", located on the Message Board at http://www.sun.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity