sap获取系统时间_获取系统当前时间
NSString *appKey()
{
// // 獲取系統當前時間
// NSDate * date = [NSDate date];
// NSTimeInterval sec = [date timeIntervalSinceNow];
// NSDate * currentDate = [[NSDate alloc] initWithTimeIntervalSinceNow:sec];
//
// //設置時間輸出格式:
// NSDateFormatter * df = [[NSDateFormatter alloc] init ];
// [df setDateFormat:@"yyyyMMddHHmmss"];
// NSString * na = [df stringFromDate:currentDate];
//取毫秒
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateStyle:NSDateFormatterMediumStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
[dateFormatter setDateFormat:@"SSSSMMddHHmmss"];//毫秒-月-日-時-分秒
NSString *time = [dateFormatter stringFromDate:[NSDate date]];
NSString *appKey = [NSString stringWithFormat:@"%@%@",time,[[NSString stringWithFormat:@"ecej12345678%@",time] md5HexDigest]];
return appKey;
}
總結
以上是生活随笔為你收集整理的sap获取系统时间_获取系统当前时间的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jquery手写轮播图_15个超强的jQ
- 下一篇: c java 系统开发_java开发系统