MATLAB: How to convert an epoch value to a ‘datetime’ value, with millisecond precision

convertdatetimeepochMATLABmillisecondprecisiontransfer

How can I transfer an epoch value into real time, with precision to the millisecond?

Best Answer

You can transfer an epoch value, 'epVal', to a 'datetime' value with millisecond precision with the following line:
>> d = datetime(epVal, 'convertfrom', 'posixtime', 'Format', 'MM/dd/yy HH:mm:ss.SSS');
For further information about 'datetime' values and their properties, please see the following MATLAB documentation page: