Iphone String DateTime To int with change format
===

I have String include this "2012-07-16 10:20:25" and i want to change the DateTime Format to "yyyyMMddHHmmss" it will be "20120716102025" and want to but this number in int var.

I tried.

    NSDateFormatter *ConvertFormat;
    int *DateTimeConverted;
    
    ConvertFormat = [[NSDateFormatter alloc] init];
    [ConvertFormat setDateFormat:@"yyyyMMddHHmmss"];
    
    DateTimeConverted = [ConvertFormat stringFromDate:StringDateTime];