function TimeVectorDisplay(h,time)
% display the time vector selection information
tmpStr='Time vector is selected from :';
tmpSheetStr=get(h.Handles.COMBtimeSheet,'String');
if isempty(time)
    return;
end
if iscell(time)
    % absolute time
    if get(h.Handles.RADIOtimeColumn,'Value')==1
        set(h.Handles.TXTtimeUnit,'String','Absolute Time Format :');    
        set(h.Handles.COMBtimeUnit,'String',h.IOData.formatcell.matlabFormatString);    
        set(h.Handles.COMBtimeUnit,'Value',getfield(h.IOData.formatcell,'columnIsAbsTime')+1);
        tmpUnitStr=get(h.Handles.COMBtimeUnit,'String');
        tmpColStr=get(h.Handles.COMBtimeColumn,'String');
        set(h.Handles.TXTtimeInfo,'String',[tmpStr,'   Workbook ',h.IOData.ExcelFileName, ...
            ',   Sheet ', tmpSheetStr{get(h.Handles.COMBtimeSheet,'Value')}, ...
            ',   Column ', tmpColStr{get(h.Handles.COMBtimeColumn,'Value')}, ...
            ',   Start Time ', time{1}, ...
            ',   End Time ', time{end}]);
        if get(h.Handles.RADIOtimeVALUE,'Value')==1
            if get(h.Handles.RADIOsampleCOLUMN,'Value')==1
                % a data sample is a column
                set(h.Handles.EDTcolumnsFROM,'String',time{1});
                set(h.Handles.EDTcolumnsTO,'String',time{end});
            else
                set(h.Handles.EDTrowsFROM,'String',time{1});
                set(h.Handles.EDTrowsTO,'String',time{end});
            end
        end
    else
        set(h.Handles.TXTtimeUnit,'String','Absolute Time Format :');    
        set(h.Handles.COMBtimeUnit,'String',h.IOData.formatcell.matlabFormatString);    
        set(h.Handles.COMBtimeUnit,'Value',getfield(h.IOData.formatcell,'rowIsAbsTime')+1);
        tmpUnitStr=get(h.Handles.COMBtimeUnit,'String');
        tmpRowStr=get(h.Handles.COMBtimeRow,'String');
        set(h.Handles.TXTtimeInfo,'String',[tmpStr,'   Workbook ',h.IOData.ExcelFileName, ...
            ',   Sheet ', tmpSheetStr{get(h.Handles.COMBtimeSheet,'Value')}, ...
            ',   Row ', tmpRowStr{get(h.Handles.COMBtimeRow,'Value')}, ...
            ',   Start Time ', time{1}, ...
            ',   End Time ', time{end}]);
        if get(h.Handles.RADIOtimeVALUE,'Value')==1
            if get(h.Handles.RADIOsampleCOLUMN,'Value')==1
                % a data sample is a column
                set(h.Handles.EDTcolumnsFROM,'String',time{1});
                set(h.Handles.EDTcolumnsTO,'String',time{end});
            else
                set(h.Handles.EDTrowsFROM,'String',time{1});
                set(h.Handles.EDTrowsTO,'String',time{end});
            end
        end
    end
else
    % relative time with unit
    if get(h.Handles.RADIOtimeColumn,'Value')==1
        set(h.Handles.TXTtimeUnit,'String','Time Unit :');    
        set(h.Handles.COMBtimeUnit,'String',{'Years','Weeks','Days','Hours','Mins','Secs'});    
        set(h.Handles.COMBtimeUnit,'Value',6);    
        %tmpUnitStr=get(h.Handles.COMBtimeUnit,'String');
        tmpColStr=get(h.Handles.COMBtimeColumn,'String');
        set(h.Handles.TXTtimeInfo,'String',[tmpStr,'   Workbook ',h.IOData.ExcelFileName, ...
            ',   Sheet ', tmpSheetStr{get(h.Handles.COMBtimeSheet,'Value')}, ...
            ',   Column ', tmpColStr{get(h.Handles.COMBtimeColumn,'Value')}, ...
            ',   Start Time ', num2str(min(time)), ... %' ', tmpUnitStr{get(h.Handles.COMBtimeUnit,'Value')}, ...
            ',   End Time ', num2str(max(time))]); %, ' ', tmpUnitStr{get(h.Handles.COMBtimeUnit,'Value')}
    else
        set(h.Handles.TXTtimeUnit,'String','Time Unit :');    
        set(h.Handles.COMBtimeUnit,'String',{'Years','Weeks','Days','Hours','Mins','Secs'});    
        set(h.Handles.COMBtimeUnit,'Value',6);    
        tmpUnitStr=get(h.Handles.COMBtimeUnit,'String');
        tmpRowStr=get(h.Handles.COMBtimeRow,'String');
        set(h.Handles.TXTtimeInfo,'String',[tmpStr,'   Workbook ',h.IOData.ExcelFileName, ...
            ',   Sheet ', tmpSheetStr{get(h.Handles.COMBtimeSheet,'Value')}, ...
            ',   Row ', tmpRowStr{get(h.Handles.COMBtimeRow,'Value')}, ...
            ',   Start Time ', num2str(min(time)), ... % ' ', tmpUnitStr{get(h.Handles.COMBtimeUnit,'Value')}, ...
            ',   End Time ', num2str(max(time))]); % , ' ', tmpUnitStr{get(h.Handles.COMBtimeUnit,'Value')}]);
    end
end


