UIDatePickerModeDateAndTime returns an output in format
2012-12-20 07:15:18 +0000.
How can I remove the +0000 from the output?
I wanted to make a screenshot, but yet my reputation is not enough, I hope it will clear my question.
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.
use a
NSDateFormatterIf you want to show the date to the user please use
setDateStyle:andsetTimeStyle:, because they are locale aware and produce the output in the correct format.If you need that date only for the back end (e.g. creating a file name) use
setDateFormat:.