[y,m,d]
= ymd(t)
returns the year, month, and day numbers of the datetime values in
t as separate numeric arrays. The y,
m, and d outputs are the same size as
t, and contain integer values.
The ymd function is equivalent to calling the
year, month, and day
functions on the same datetime array.
ISO year numbers, returned as a scalar, vector, matrix, or
multidimensional array of integer values. ISO year numbers include a year
zero and represent years BCE using negative values. y is
of type double and is the same size as
t.
Month numbers, returned as a scalar, vector, matrix, or multidimensional
array of integer values from 1 to 12. m is of type
double and is the same size as
t.
Day of month numbers, returned as a scalar, vector, matrix, or
multidimensional array of integer values from 1 to 28, 29, 30, or 31,
depending on the month and year. d is of type
double and is the same size as
t.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.