Use [Num,Txt,Raw]=xlsread() and then "Raw" will keep the "hh:mm" string format, then you can use datenum() to convert it.
If the format of the cells in Excel is "Time", it looks like the numerical value is imported using xlsread(). You can use datestr() to convert it back. For example:
>> [Num,Txt,Raw]=xlsread('test.xls')
Num =
0.4743
0.5160
0.5576
0.5576
Txt =
'Date' 'Time'
'12/31/1899' ''
'1/1/1900' ''
'1/2/1900' ''
'1/3/1900' ''
Raw =
'Date' 'Time'
'12/31/1899' [0.4743]
'1/1/1900' [0.5160]
'1/2/1900' [0.5576]
'1/3/1900' [0.5576]
>> datestr(Num,'HH:MM')
ans =
11:23
12:23
13:23
13:23
Best Answer