Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > R

RTIME

Scroll Prev Top Next More

(RTIME(hrs,min,sec,frc))

 

Converts integers hrs, min, sec, and frc to a TIME data type. Hrs is on a 24-hour scale. RTIME can be specified for up to thousandths of a second. The frc argument is optional.

 

In the following example, the value of vrtime is 12:15:30, stored in internal R:BASE time format.

 

The time value will be displayed according to how you have set the TIME format. When you use time data in expressions, the result is given in seconds. You can use RTIME to convert this result to hours, minutes, and seconds. The value of velapsed1 is 1170 seconds; the value of velapsed2 is 0:19:30.

 

SET VAR vrtime = (RTIME(12,15,30))

SET VAR vstart TIME = '1:10:40'

SET VAR vend TIME = '1:30:10'

SET VAR velapsed1 = (.vend - .vstart)

SET VAR velapsed2 = (RTIME(0,0,.velapsed1))