Convert NSDate to NSString

You can also try

NSString *dateString = [NSString stringWithFormat:[NSDate date]];

You can do it like this:

NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[formatter setDateStyle:NSDateFormatterShortStyle];
[formatter setTimeStyle:NSDateFormatterNoStyle];
NSString *result = [formatter stringFromDate:[NSDate date]];

This will display it in the users settings (but in a similar way), so for me results will be 7/28/10


You can also do this way :

NSDateFormatter* df = [[NSDateFormatter alloc]init];
[df setDateFormat:@"MM/dd/yyyy"];
NSString *result = [df stringFromDate:date];
[df release];