facebook

The Difference Between Two Dates & Times

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #334557 Reply

    I need help with an APP that has several screens. One one screen, the user inputs the beginning date and time and the ending date and time. I need to know how to calculate the difference in the dates and times. I need to know the coding and how to implement it. Can anyone help? Please explain in detail.

    I’ve attached an example of the screen that I am using.

    Thank you.

    Celeste See attachment Date and Time Example.zip

    Attachments:
    You must be logged in to view attached files.
    #334558 Reply

    paulD
    Member

    I was just about to post the same thing spooky! I would also really like to calculate between times. Anyone know how it would be hugely appreciated.

    Paul

    #334559 Reply

    Unknown Author
    Participant

    Do “View Source” on this guy’s page. All the code is there.

    http://www.timeanddate.com/date/duration.html

    Am I the only one here who learned HTML by view-sourcing everything? 🙂

    -1TC

    #334562 Reply

    support-michael
    Keymaster

    I was looking at date arithmetic libs awhile back.
    Here is one that might be useful for parsing a string to a date, subtracting 2 dates and then working with duration.
    http://momentjs.com/

    Or visit this link and scroll down to see a simple algo for subtracting 2 dates:
    http://www.ifadey.com/2012/04/common-javascript-date-operations/

    #334567 Reply

    Very funny 1TC! I know how to view sourcecode.

    So, can you take my example that I attached and add the code to do the calculation so everyone can see how it’s done?

    On this website there are some that are “more geeky” than others. Being a “geek”, IMO, is a compliment! Some of us (myself included) are not as intelligent as you to figure this out.

    This would help as I’ve posted this question a few times as others have.

    Thank you.

    Celeste

    #334568 Reply

    Thanks Wayne but some of us need more help than than. Can you send an example of how the code would look in the custom file using my example?

    Thank you.

    Celeste

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: The Difference Between Two Dates & Times

You must be logged in to post in the forum log in