manual:chapter6:system:cmd_fromhms

#### Synopsis

Convert hours / minutes / seconds to decimal time

#### Stack Diagram

Input Stack Output Stack
Rtime-hms Rtime-dec
Level 1 Level 1

 Keyword type Command Parallel list processing capabilities Group 5 One argument, one result commands Affected by flags None

#### Description

The HMS→ command converts a value representing hours / minutes / seconds to hours with a decimal fraction. The input is expressed by a real number in the format HH.MMSS, where:

• HH are the hours;
• MM are the minutes;
• SS are the seconds.

It is not mandatory that MM or SS are less than 60. In fact, they can be up to 99: in any case HMS→ will compute the correct result. An useful consequence derives from this property: the sequence HMS→ →HMS can be used to normalize a time value so that both MM and SS are less than 60.

#### Compatibility

HMS→ is not fully equivalent to its userRPL counterpart.

In particular:

• in userRPL the time value can express fractions of seconds too; in newRPL it is not allowed.

#### Usage

Input

4:
3:
2:
1:                                 15.30
…………………………………………………………………………………………………………
HMS→                                    

Output

4:
3:
2:
1:                                  15.5
…………………………………………………………………………………………………………


#### Related Commands

Command Short Description
→DATE Set current system date in MM.DDYYYY
DATE+ Add days to a date in MM.DDYYYY
→TIME Set current time as HH.MMSS
→HMS Convert decimal time to HH.MMSS
HMS→ Convert time in HH.MMSS to decimal
HMS+ Add time in HH.MMSS format
HMS- Subtract time in HH.MMSS format
TICKS Return system clock in microseconds CHANGED
TEVAL Perform EVAL and measure elapsed time CHANGED
DATE Current system date as MM.DDYYYY
DDAYS Number of days between dates in MM.DDYYYY
TIME Current time in HH.MMSS
TSTR
ACK Acknowledge oldest alarm (dismiss)
ACKALL Acknowledge (dismiss) all alarms
RCLALARM Recall specified alarm
STOALARM Create a new alarm
DELALARM Delete an existing alarm
FINDALARM Get first alarm due after the given time
VERSION Get newRPL version string
MEM Get available memory in bytes
BYTES Size of an object in bytes and CRC32 CHANGED