Why am I getting the following datetime error message?
1 view (last 30 days)
Here is the message I am receiving:
Unable to convert the text to datetime using the format 'yyyy-MM-dd'T'hh:mm:ss.sssZ'.
I am pretty confused about this, as I have an array of UTC dates (and these are strings) that look like the following:
And, so far as I know, this looks just like the format datetime requires. Could someone please point me in the right direction as to what is going wrong? Thank you in advance!! :)
My file is attached, and here is my code:
filename = 'RSPB_MAGNETOMETER2.xls'; %data courtesy of NASA SPDF, Craig Kletzing
A2 = readtable(filename);
Brms2 = table2array(A2(:,2));
dateVec2 = table2array(A2(:,1));
dates2 = datetime(dateVec2,'InputFormat','yyyy-MM-dd''T''hh:mm:ss.sssZ','TimeZone','UTC');