function timestring = get_timestring (self, frame, format, applyCorrection)
    % timestring = GET_TIMESTRING (self, frame, format, applyCorrection)
    %
    % Return time string, formatted according to specified format, for the
    % specified frame.
    %
    % Input:
    %  - self = @TimestampDatabase instance
    %  - frame = frame number
    %  - format = format, same as for DATESTR function
    %  - applyCorrection = whether to apply date and time offset corrcetion
    %    to the timestamp (see GET_TIMESTAMP function). Default value is
    %    false.
    %
    % Output:
    %  - timestring = resulting time string
    %
    % Copyright (C) 2011-2012, Rok Mandeljc <rok.mandeljc@fe.uni-lj.si>
    
    if nargin < 4,
        applyCorrection = false;
    end
    
    % Grab timestamp
    timestamp = self.get_timestamp(frame, applyCorrection);
    
    % Convert Unix epoch to Matlab datenum
    dn = datenum('01-Jan-1970') + timestamp/86400;

    % Format string
    timestring = datestr(dn, format);
end
