\documentclass{article} \usepackage{datetime2} \begin{document} This PDF was created on \DTMnow. \end{document}