[Tex/LaTex] How to typeset the date/time at compile time


For printed drafts of my papers, I would like to add a timestamp on every page with the date/time when the document was last compiled. Is there any LaTeX command that produces the current date/time at compile time? Even better, is there any package that already solves my problem?

Best Answer

One can use \today to get the current date, the command \currenttime from datetime package to get the current time, and fancyhdr package to add it to every page.

Related Question