DateToSec

Converts any Date to (total number of) seconds

You are now following this Submission

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 (2026). DateToSec (https://www.mathworks.com/matlabcentral/fileexchange/64197-datetosec), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0