how to convert time in its standard form to seconds?
7 views (last 30 days)
Show older comments
Hi Team,
I have time in its standard format Hh:mm.ss loaded from excel sheet. how can i convert it into complete seconds which helps me in further calculation.
0 Comments
Accepted Answer
Mischa Kim
on 10 Mar 2014
Edited: Mischa Kim
on 10 Mar 2014
t1 = '12:45:07';
t2 = '13:45:07';
dt_sec = round((datenum(t2,'HH:MM:SS') - datenum(t1,'HH:MM:SS'))*(24*3600))
dt_sec =
3600
4 Comments
More Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!