MATLAB: Read in timestamps from weird time format

datenumtimestamputc

Hello! I am trying to read in data collected in CA. The timestamps are UTC times recorded as a string that includes characters I do not need. Can you help me figure out how to read in a column of timestamps that look likes this (see below). I want to end up with mtimes or even just separate the timestamps parts so that I can use datenum myself to reconnect the parts. Thank you! This is a column in a csv file if that makes a difference.
'2015-05-07T05:48:59Z'
'2015-05-07T05:58:59Z'
'2015-05-07T06:18:59Z'
'2015-05-07T06:28:58Z'
'2015-05-07T06:38:59Z'
'2015-05-07T06:48:59Z'
'2015-05-07T06:58:59Z'
'2015-05-07T07:08:58Z'
'2015-05-07T07:18:59Z'
'2015-05-07T07:28:59Z'
'2015-05-07T07:38:59Z'
'2015-05-07T07:48:59Z'
'2015-05-07T07:58:59Z'
'2015-05-07T08:08:58Z'
'2015-05-07T08:18:59Z'
'2015-05-07T08:28:59Z'
'2015-05-07T08:38:59Z'
'2015-05-07T08:48:59Z'
'2015-05-07T08:58:59Z'
'2015-05-07T09:08:58Z'

Best Answer

If the data is stored in a cell array of character vectors, S, then
datetime(S, 'InputFormat', 'uuuu-MM-dd''T''hh:mm:ss''Z''', 'TimeZone', 'UTC')