Main Content
hms
Hour, minute, and second numbers of datetime or duration
Syntax
Description
[
returns the hour, minute, and second values of the datetime or duration values in
h
,m
,s
]
= hms(t
)t
as separate numeric arrays. The h
and
m
outputs contain integer values, and the
s
output can contain a fractional part. h
,
m
, and s
are the same size as
t
.
Calling hms
on a datetime array is equivalent to calling the
hour
, minute
, and
second
functions.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2014b