+(NSString*)getTimeStrFromDate:(NSDate*)date
{
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSString *timeStr = [dateFormatter stringFromDate:date];
[dateFormatter release];
return timeStr;
}
沒有留言:
張貼留言