I am using the following code to change yyyy-MM-dd to M-dd-yyyy using NSDateFormatter but NSLog is returning the value nil. Please help. Thanks in advance.

```
NSString *trimmedDOB=@"1992-11-15";
NSDateFormatter *format = [[NSDateFormatter alloc] init];

[format setDateFormat:@"MM-dd-yyyy"];
NSDate *DateOfBirth=[format dateFromString:trimmedDOB];

NSLog(@"DATE IS %@",DateOfBirth);

```