¡@

Home 

2014/10/15 ¤U¤È 10:12:24

iphone Programming Glossary: outputformatter

how to convert datetime format in NSString?

http://stackoverflow.com/questions/2076417/how-to-convert-datetime-format-in-nsstring

want to do something like this NSDateFormatter inputFormatter NSDateFormatter alloc init autorelease NSDateFormatter outputFormatter NSDateFormatter alloc init autorelease inputFormatter setDateFormat @ yyyy MM dd'T'HH mm ss'.000Z' outputFormatter setDateFormat.. outputFormatter NSDateFormatter alloc init autorelease inputFormatter setDateFormat @ yyyy MM dd'T'HH mm ss'.000Z' outputFormatter setDateFormat @ EEE MMM d yyyy h mm a NSString inputString @ 2009 11 23T05 24 41.000Z NSDate inputDate inputFormatter dateFromString.. @ 2009 11 23T05 24 41.000Z NSDate inputDate inputFormatter dateFromString inputString NSString outputString outputFormatter stringFromDate inputDate outputString @ Mon Nov 23 2009 05 24 AM See the Unicode date format patterns guide for more information..

NSDate format issue

http://stackoverflow.com/questions/5846144/nsdate-format-issue

instead of April 30 2011 7 55PM it returns 2011 05 01 02 55... any idea what am i doing wrong NSDateFormatter outputFormatter NSDateFormatter alloc init outputFormatter setDateFormat @ h mm a objEventInsert.eventtime outputFormatter stringFromDate.. returns 2011 05 01 02 55... any idea what am i doing wrong NSDateFormatter outputFormatter NSDateFormatter alloc init outputFormatter setDateFormat @ h mm a objEventInsert.eventtime outputFormatter stringFromDate self.datePicker.date NSLog @ @ objEventInsert.eventtime.. outputFormatter NSDateFormatter alloc init outputFormatter setDateFormat @ h mm a objEventInsert.eventtime outputFormatter stringFromDate self.datePicker.date NSLog @ @ objEventInsert.eventtime NSDateFormatter dateForm NSDateFormatter alloc init..