Jump to content

Time: Adding elapsed hours?

  • Please log in to reply
No replies to this topic



    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts
Hi I have just started out with programming with cocoa and I am trying to create a simple flying logbook application with which you can record every flight you do and the duration of that flight so then it can total up and tell you how many flying hours you have!

So far I have decided to use core data for this application (please tell me if there's a better way or if this is the way forward) and one of the attributes in the entity logbook is 'flight duration' I set this a date type but when i came to use it it obviously deals with time in the sense of hours, days, weeks etc. not how I want to use it! For example I will have a flight of 1:30 then next of 0:30 then of 2:15 etc. which I want to total to give me 4:15 and obviously once I add enough flights to give me over 24 hours it would tell me my time in 1 day and x hours etc. I want it to tell me I have 214:15 etc.

For example you can do this in Microsoft excel by formatting the cells like this: [h]:mm
where [h] is hours elapsed time.

I hope that long winded explanation makes some sense


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy