Tuesday, 18 June 2013

Device current date xcode


    NSDate *date=[NSDate date];
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"dd MM YYYYhh:mm:ss"];// set your required format
    NSString *dateTaken = [formatter stringFromDate:date];

    NSLog(@"strDateTaken %@",dateTaken);