- This topic has 5 replies, 4 voices, and was last updated 11 years, 9 months ago by Celeste Patin.
-
AuthorPosts
-
Celeste PatinMemberI 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.
paulDMemberI 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
Unknown AuthorParticipantDo “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
support-michaelKeymasterI 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/
Celeste PatinMemberVery 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
Celeste PatinMemberThanks 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
-
AuthorPosts