According to the datevec documentation (did you read it ?) you can simply put either AM or PM in the token position to read the AM/PM info: >> datevec('Jul_26_2016__11-26-37_AM','mmm_dd_yyyy__HH-MM-SS_AM')
ans =
2016 7 26 11 26 37
>> datevec('Jul_26_2016__11-26-37_PM','mmm_dd_yyyy__HH-MM-SS_AM')
ans =
2016 7 26 23 26 37
Best Answer