How to convert NSDate to milliseconds in Objective C? -
this question has answer here:
- how nsdate millisecond accuracy? 3 answers
for example: assume nsdate tempdate = "05-23-2013"
. want value converted milliseconds.
how can objective c?
there similar post here , here.
basically have second form reference date (1 january 2001, gmt) , multiply 1000.
nstimeinterval seconds = [nsdate timeintervalsincereferencedate]; double milliseconds = seconds*1000;
cheers!
Comments
Post a Comment