how to find current time in millis

Answers (1)

datestr(now,'yyyy/mm/dd HH:MM:SS.FFF')
ans = '2021/02/09 12:28:19.679'

3 Comments

@Rik the ans is string type bro. could we get the ans in integer or double type? and make its literally in miliseconds time?
Milliseconds since what base time?
[h,m,s] = hms(datetime)
h = 19
m = 42
s = 58.3741
ms = round(s * 1000)
ms = 58374
@Walter Roberson yes. this is what I'm talking about. thank you so much Sir.

Sign in to comment.

Categories

Tags

Asked:

on 9 Feb 2021

Commented:

on 9 Jun 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!