how to find current time in millis
Show older comments
how to find current time in millis in matlab
Answers (1)
datestr(now,'yyyy/mm/dd HH:MM:SS.FFF')
3 Comments
Ni Rui Cheng
on 8 Jun 2021
@Rik the ans is string type bro. could we get the ans in integer or double type? and make its literally in miliseconds time?
Walter Roberson
on 8 Jun 2021
Edited: Walter Roberson
on 8 Jun 2021
Milliseconds since what base time?
[h,m,s] = hms(datetime)
ms = round(s * 1000)
Ni Rui Cheng
on 9 Jun 2021
@Walter Roberson yes. this is what I'm talking about. thank you so much Sir.
Categories
Find more on Dates and Time 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!