Post Reply 
(11C) Time Duration
05-07-2023, 01:15 PM (This post was last modified: 05-08-2023 12:21 AM by Gamo.)
Post: #1
(11C) Time Duration
HP-11C or 15C program to calculate the number of

Hours and Minutes in between two times period.

Procedure:

Input your time in decimal format for example:

11:25 input as 11.25
9:05 input as 9.05

LBL A for the Starting Time
LBL B for the Ending Time
LBL C for Times Period with the same AM to AM or PM to PM time.
LBL D for Times Period beyond Noon or Midnight.

Example Usage: [USER] Fix 2

Calculate the hours from 12:15 PM to 4:56 PM
This problem is in the same times period PM to PM so use LBL C

12.15 [A] 4.56 [B] [C] display 4.41 answer: 4 hours 41 minutes

Calculate the hours from 7:45 AM to 6:05 PM
This problem shift from AM to PM so use LBL D

7.45 [A] 6.05 [B] [D] display 10.20 answer: 10 hours 20 minutes
------------------------------------------------------------------------
Program:
Quote:LBL A
H→
STO 0
RTN
----------
LBL B
H→
STO 1
RTN
----------
LBL C
X<>Y
INT
12
X=Y
GTO 0
RCL 1
RCL 0
-
→H.MS
X<0
GTO 1
RTN
----------
LBL D
RCL1
12
+
RCL 0
-
→H.MS
RTN
----------
LBL 0
RCL 1
RCL 0
12
-
-
→H.MS
RTN
----------
LBL 1
CHS
RTN

Gamo 5/2023
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)