<< year Time and Date Output functions >>

Scilab Help >> Time and Date > ymd

ymd

extracts year, month and day of datetime

Syntax

[y, m, d] = ymd(dt)

Arguments

dt

datetime

y

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

m

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

d

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

Description

[y, m, d] = ymd(dt) returns the year, month and day values of input argument dt.

Examples

dt = datetime(2024, 10, 5):caldays(20):datetime(2025, 3, 25)
[y, m, d] = ymd(dt)

See also

History

VersionDescription
2024.0.0 Introduction in Scilab.

Report an issue
<< year Time and Date Output functions >>