At 18:58 28/11/2017 +0000, Andrea Guido wrote:
I am trying to add an autopopulating date and time in to a document for somebody, and cannot find any information online on how to do that.

What sort of document is this?

o If it is a spreadsheet (Calc) document, you can use the NOW() function.

o If it is a text (Writer) document, you can use Insert | Fields > | Date and Insert | Fields > | Time. See also Insert | Fields > | Other... | Document; for Type select Time, and you will see both "Time (fixed)" and Time under Select - which behave differently. Note that - confusingly - the version you get from Insert | Fields > | Time corresponds to "Time (fixed)" and not to Time.

You may want to experiment with these.

But have you thought this through? If the entry genuinely "autopopulates", would it not behave simply as a calendar and clock - showing the current values at all times? That can hardly be what you want. Instead, you must want an entry that changes to show the current values on certain actions but not otherwise. Do you perhaps want to see the values when the document was created? Or last saved? Or edited in any way? Then you need to control the changes just to these events. If the changes occur on the opening of a document, for example, you would again see the current values, not those for when some previous event occurred.

You can obtain dates and times for some events - Created, Last printed, and Modified - at Insert | Fields > | Other... | DocInformation. Note also the "Fixed content" option for these.

In a spreadsheet, you can fix the date and time values from NOW() by entering =NOW() into a cell, copying the contents, and pasting them back over the original, but using Edit | Paste Special... (or right-click | Paste Special... or Ctrl+Shift+V) and ensuring that "Date & time" is ticked but Formulae is *not* ticked.

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org

Reply via email to