Created
December 1, 2016 16:39
-
-
Save monsoir/9c24c5d688111119c85c0e05cc9bc5fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//获取当前时间 | |
NSDate *now = [NSDate date]; | |
//设置日期格式 | |
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
[dateFormatter setDateFormat:@"yyyyMMddHHmmssSSS"]; | |
//获取日期字符串 | |
NSString *dateString = [dateFormatter stringFromDate:now]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment