Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Time: Adding elapsed hours?

1 post in this topic

Recommended 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



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.