s = second( returns the second
values, including a fractional part, for the datetime values in
s output is a
double array the same size as
contains values from 0 to less than 60.
For datetime values whose time zone is
s output can contain a value between 60 and 61 for times
that fall during a leap second occurrence.
Find Second Number of Datetime Values
t1 = datetime('now','Format','dd-MMM-yyyy HH:mm:ss.SSS'); t = t1 + seconds(30:15:60)
t = 1x3 datetime Columns 1 through 2 01-Sep-2021 10:38:39.935 01-Sep-2021 10:38:54.935 Column 3 01-Sep-2021 10:39:09.935
s = second(t)
s = 1×3 39.9356 54.9356 9.9356
secondType — Type of second values
'secondofminute' (default) |
Type of second values, specified as either
secondreturns the second of the minute.
secondreturns the second of the day, which (except for leap seconds) is in the range [0, 86400).
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).