I have a requirement in project
to Convert 24 hours format to 12 hours format
for example
if it is 17:12:01 it should be converted to 05:12:01
I have a requirement in project to Convert 24 hours format to 12 hours
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use a
SimpleDateFormathttp://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html to format it.As suggested by Software Monkey, also use a SimpleDateFormat to parse your 24hr date if you don’t already have it in millis.