6
Ich bin neu auf iPhone-Entwicklung. In meinem Eingabedatum Format ist "2010-03-05T18: 20: 40Z", und ich donno, wie man ein Eingabeformat meines Codes gibt. So habe ich in meinem Code (?) Erwähnt.Wie gebe ich ein Eingabedatum Format in iPhone
Eingabedatum format = "2010-03-05T18: 20: 40Z"
Hier ist mein Code:
NSString *indate = @"2010-03-05T18:20:40Z";
NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
[inputFormatter setDateFormat:@"????????????????????????"];
NSDate *inputDate = [inputFormatter dateFromString:indate];
NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init];
[outputFormatter setDateFormat:@"EEE. MMM. d, yyyy"];
NSString *outputDate = [outputFormatter stringFromDate:inputDate];
lDate.text = outputDate;
Plz mir helfen.
Danke.
Hallo Mann aus, es funktioniert gut. Vielen Dank ..... – Pugal
@Zapping "Mo, 22 Jun 2009 12:00:00 GMT", für das obige Format wie soll ich Eingabeformat geben ?, ich donno für GMT. – Pugal
@Pugal sollte dies tun "EEE, TT MMM JJJJ HH: mm: ss zzzz". – zapping