1 //JAVA日期格式
2 Date date = new Date();
3 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
4 String dateTime = dateFormat.format(date);
1 //IOS日期格式 2 NSDate *date = [NSDate date]; 3 4 NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 5 formatter.dateFormatter = "@yyyy-MM-dd hh:mm:ss"; 6 NSString *string = [formatter stringFromDate:date];