datetime

Methods

Method Reference: datetime.datevec

datetime: DV = datevec (T)

Convert datetime array to date vectors.

DV = datevec (T) returns a numeric matrix with one row per element in T.

Source Code: datetime

datevec returns the six date-vector components [Y M D h m s], one row per element of the array.

 t = datetime (2024, 3, 9, 6, 0, 0)
t =
  datetime

   09-Mar-2024 06:00:00
 datevec (t)
ans =

   2024      3      9      6      0      0