iOS: How do I convert NSDate to NSString?
You can use:
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss zzz"];
//Optionally for time zone conversions
[formatter setTimeZone:[NSTimeZone timeZoneWithName:@"..."]];
NSString *stringFromDate = [formatter stringFromDate:myNSDateInstance];
iOS: How do I convert NSDate to NSString?
Reviewed by Unknown
on
10:42
Rating:
No hay comentarios: