sec2hms: Convert decimal times to h:mm:ss format

View source: R/sec2hms.R

sec2hmsR Documentation

Convert decimal times to h:mm:ss format

Description

sec2hms and min2hms convert decimal numbers of seconds and minutes to h:mm:ss format. h may exceed 23 and is omitted if h = 0.

Usage

sec2hms(x, nearest = T)

min2hms(x, nearest = T)

Arguments

x

Decimal number to be converted.

nearest

Whether x should be rounded to the nearest second. Otherwise x is rounded down. Default is TRUE.

Value

A character scalar.

Examples

sec2hms(97448.7)  # 27:04:09
min2hms(1624.145)  # 27:04:09


bldavies/bldr documentation built on March 29, 2024, 10:22 a.m.