[Tex/LaTex] How to write date and time in footer


I am writing a report in which i need to write date and time in the footer. How do I write date and time in footer?


      Jan 8, 2013 5:45 PM

Best Answer

You can use the fancyhdr and datetime package to help with this, as demonstrated in the following MWE.

Note that \today is actually defined in LaTeX (no extra packages needed), but you need datetime for \currenttime


\fancyfoot[L]{\today\ \currenttime}




This generates the following footer.

screenshot of generated PDF

The fancyhf command clears the header and the footer, and the fancyfoot command does the specific part of your question. Setting the pagestyle as fancy seals the deal.