If you have a recent version of MATLAB, you can use the Import Tool to do it interactively, then generate the code. Or you can jump straight to the joy of the textscan function!
Do you need the dates at all? It sounds like the only time information you want is minutes and seconds. So:
fid = fopen('filename.txt');
rawdata = textscan(fid,'%*s %*f %f %f %*s %f %*f','delimiter',{' ',';',':'},...
'MultipleDelimsAsOne',true);
times = rawdata{1} + rawdata{2}/60;
powconsumed = rawdata{3};
fid = fclose(fid);
This treats the file as a string (the date) followed by a space delimiter, followed by three numbers separated by a : delimiter, followed by a space delimiter and another string ("PM"), then two numbers separated by a ; delimiter. The * characters in the format string tell textscan to ignore those fields, so it just reads the minute, second, and power fields. I'm also converting minutes and seconds to a decimal minute (minute + second/60). You can change that to whatever you want -- keep them separate if you want.
Best Answer