Table of contents
Share Post

You can create a static method like this:

+ (NSDate *)SQLDateTimeToNSDate:(NSString *)textDate {
    NSDateFormatter *dateFormater = [[NSDateFormatter alloc] init];
    [dateFormater setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    NSDate *date = [[NSDate alloc] init];
    date = [dateFormater dateFromString:textDate];
    [dateFormater release];
    return date;
}

laurent

Stay in the loop

Subscribe to our free newsletter.

Related Articles