Print a Timestamp

TIMESTAMP, a MATLAB library which prints the current YMDHMS date as a timestamp.

This is useful when documenting the run of a program. By including a timestamp, the output of the program will always contain a clear indication of when it was created. Other indicators, such as the file timestamp, may be misleading or subject to unintentional modification.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


TIMESTAMP is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

tic_toc_test, MATLAB programs which demonstrate some features of MATLAB's tic and toc functions for wallclock timing.

timer_test, a MATLAB program which shows how to compute the elapsed CPU time inside a program.

timestamp, a MATLAB library which returns the YMDHMS date as a timestamp.


WTIME, a MATLAB library which returns a reading of the wall clock time in seconds.

Source Code:

Last revised on 19 February 2019.