Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例: と仮定しNSDate tempdate = "05-23-2013"ます。この値をミリ秒に変換したい。
NSDate tempdate = "05-23-2013"
Objective-Cでこれを行うにはどうすればよいですか?
こことここに同様の投稿があります。
基本的に、基準日 (2001 年 1 月 1 日、GMT) から 2 番目のフォームを取得し、それに 1000 を掛けます。
NSTimeInterval seconds = [NSDate timeIntervalSinceReferenceDate]; double milliseconds = seconds*1000;
乾杯!