Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.1.0 - Français


hms

extracts hour, minute and second of datetime or duration

Syntax

[h, m, s] = hms(dt)

Arguments

dt

datetime or duration

h

real scalar, vector or matrix containing hour value(s) of dt

m

real scalar, vector or matrix containing minute value(s) of dt

s

real scalar, vector or matrix containing second value(s) of dt

Description

[h, m, s] = hms(dt) returns the hour, minute and second values of input argument dt.

Examples

dt = datetime([2025 1 29 1 25 30; 2025 1 29 3 43 12; 2025 1 29 15 24 46]);
[h, m, s] = hms(dt)

d = duration(12, 30, 45) + minutes(0:25:100);
[h, m, s] = hms(d)

See also

  • datetime — create points in time
  • duration — create a duration - duration in hours, minutes and seconds

History

VersionDescription
2024.0.0 Introduction in Scilab.
2025.1.0 hms accepts duration as input argument.
Report an issue
<< getdate Temps - calendrier date horloge hours >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu May 22 12:54:26 CEST 2025