I need to enter the time value hh:mm:ss (09:45:56) format , but in the Xcode text field I always get (094556) as format –
how to resolve this?
I need to enter the time value hh:mm:ss (09:45:56) format , but in the
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
NSDateFormatterto parse any custom formatThis should give you a date of “9.45 am today”
The Docs for NSDateFormatter are pretty good but you can find the specific formatter variants possible here. Its linked from the apple docs.
http://www.unicode.org/reports/tr35/tr35-19.html#Date_Format_Patterns