Following up after getting support from MathWorks:
This was identified as a bug that exists in at least R2017b (maybe others) but is supposedly fixed in 2018a and later (I haven't checked as I'm using 2017b).
To further clarify the bug:
>> dt = datetime(0, 1, 0, 0, 0, 8.529454475000000e+06, 'Format', 'DDD:HH:mm:ss.SSS')
dt =
datetime
098:17:17:34.474
Notice that the double I input for 'seconds' in datetime ends in 475 milliseconds and the output from datetime formatted to show milliseconds shows 474.
To work around this in 2017b do the following to split the original double into 'seconds' and 'milliseconds' before input to datetime:
>> start = 8.529454475000000e+06;
>> s = floor(start);
>> ms = round((start - s)*1000);
>> dt = datetime(0, 1, 0, 0, 0, s, ms, 'Format', 'DDD:HH:mm:ss.SSS')
dt =
datetime
098:17:17:34.475