I have got two timevalues in the format: %H%M%S (E.G.161500)
These values are text-based integers.
Is there a simple function in Cocoa that calculates the diffe
The class for manipulating dates is NSDate
. The method for getting time intervals is -timeIntervalSinceDate:
. The result is a NSTimeInterval
value, which is a double
representing the interval in seconds.
You can create a NSDate
object from a NSString
with +dateWithString:
, provided that your date is formatted as 2001-03-24 10:45:32 +0600.