转载自:http://blog.csdn.net/ch_soft/article/details/6865524
NSDateFormatter *nsdf2=[[[NSDateFormatter alloc] init]autorelease];
[nsdf2 setDateStyle:NSDateFormatterShortStyle];
[nsdf2 setDateFormat:@"YYYYMMDDHHmmssSSSS"];
NSString *t2=[nsdf2 stringFromDate:[NSDate date]];
long curr=[t2 longLongValue];