If you need to display the date and time when a document is printed, first invoke the Header and Footer dialog.

Then, click on the appropriate text box, depending on the required alignment, and do the following:

When you click one of these buttons, the dialog adds an alias within square brackets at the current cursor position. You can surround this alias with any text you like. If you no longer need to display date and time in your document, delete this alias.

Click OK to save changes and close the dialog.