Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi,
I have two NSDates and want to display the time interval between these both dates as a string formatted in hours and minutes (H:mm). I was searching for it a long time, but didn't find a way to go through for this specific case.
Might want to convert to seconds, calculate the diff and then convert back...
0
Tobe·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I already have the time interval as NSTimeInternal. The real problem is how format the time interval like a date into a string.
0
etresoft·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Tobe wrote:
I already have the time interval as NSTimeInternal. The real problem is how format the time interval like a date into a string.
You can't. A timer interval is just a double. If you want to represent it as a formatted time string, you'll have to do it yourself. The following is standard procedure: