I am converting the string into date with the help of below code :
NSDateFormatter *fDateFormat = [[NSDateFormatter alloc] init]; [fDateFormat setDateFormat:@"dd/MM/yyyy hh:mm a"]; [fDateFormat setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; NSDate *dateFormat = [fDateFormat dateFromString:strDate];
And passing string like "02/09/2013 05:10 AM" and I will get date perfect. But when we use time format 24 hours, then date is nil.
Can you please me out of this problem ?