Converts any Date to (total number of) seconds.
Much faster than the command "second".
Takes into account leap years.
Accurate day count per month.
Year must be > 1.
Cite As
jasongrig (2025). DateToSec (https://www.mathworks.com/matlabcentral/fileexchange/64197-datetosec), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2016b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Dates and Time in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |