指定下格式就成了。。
NSDate *selected=[datePicker date];
NSDateFormatter *dateFormat = [[NSDateFormatteralloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd HH:mm"];
NSString *message=[[NSString alloc] initWithFormat:@"The date and time you slected is:%@",[dateFormat stringFromDate:selected]];