function data = readSpec_SBB25(specdata)
% Read table from the spec pH text file.
% Each file must have the first two rows with the following format:
% pHSys_V4.0
% Comments	DateTime Temp_used   pH_tot
% Data Data Data Data

opts = detectImportOptions(specdata,"VariableNamesLine",2);
opts.DataLines = [3,inf];
iDateTime = ismember(opts.VariableNames,'DateTime');
opts.VariableTypes{iDateTime} = 'datetime'; 
try
    opts = setvaropts(opts,'DateTime','InputFormat','MM/dd/uuuu hh:mm aa'); % aa is PM/AM
catch
    opts = setvaropts(opts,'DateTime','InputFormat','MM/dd/uuuu hh:mm');
end

data = readtable(specdata, opts);
data = data(~contains(data.Comments, 'junk'), :); % remove junks
% specpH.DateTimeRan = specpH.DateTime;

% for i = 1:height(specpH)
%     datetimestr = strsplit(string(specpH.Comments(i)),'_'); % part 2 is timestamp of sample
%     specpH.DateTime(i) = datetime(strjoin(datetimestr(2:3)),InputFormat='uuuuMMdd HHmm');
% end
data.DateTime.TimeZone = 'UTC';

end