【发布时间】:2020-11-26 10:20:38
【问题描述】:
如何将表示时间的数字从数字转换为 HMS 格式。
例如:
8.0 -> 08:00:00
0.5 -> 00:30:00
0.25 -> 00:15:00
【问题讨论】:
-
这能回答你的问题吗? How to convert decimal time to time format
-
您能否指定所需输出的
class- 它是character还是专用的时间类?如果是后者,你有data.table::as.ITime(x*3600)。 -
...或
chron::times(x/24)。