Groups
Groups
Sign in
Groups
Groups
MIT App Inventor Forum
Conversations
Labels
About
Send feedback
Help
Calculate difference between hours
27 views
chrome
home-network
mit-appinventor-2
specific-programming-issue
windows-10
Skip to first unread message
Carlos Andre
unread,
Apr 22, 2019, 12:44:40 PM
4/22/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
I need to calculate the difference between hours. Could you please help me with how to do this?
Example:
Time 1: 4/22/2019 1:40 PM
Time 2: 04/23/2019 08:40
Result: 19 hours or 1140 minutes
Thank you
TimAI2
unread,
Apr 22, 2019, 12:55:23 PM
4/22/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Try the duration blocks or convert your date/times to milliseconds, do the calculation (84600000 milliseconds per day, 3600000 milliseconds per hour)
Chris Ward
unread,
Apr 22, 2019, 1:08:50 PM
4/22/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Hi Carlos
There is an example code snippet on my website:
https://www.professorcad.co.uk/appinventorsnippets#ElapsedTime
Reply all
Reply to author
Forward
0 new messages