I've looked under insert > …? but couldn't find anything.
Can this be done via an inbuilt function or a custom script?
google docsgoogle-apps-script
I've looked under insert > …? but couldn't find anything.
Can this be done via an inbuilt function or a custom script?
Best Answer
It’s possible to insert todays date through a macro.
Open your Google Document and under Tools select Script editor. This opens Google's script editor where it’s possible to create macros for Google Documents.
Paste this script and save it as Date Macro or something:
Now refresh or reopen your document and a new menu item appears: Utilities. Under this menu an item appears called Insert Date. Click that to insert todays date at your cursor position.
To change the format of the date you need to change the “format” used in the script. The format can contain the following characters:
yyyy-MM-dd'T'HH:mm:ss'Z'
To clarify, this script merely inserts today's date at the cursor location for the day you execute the utility. That's not precisely the same as the =today() function in Google Sheets, which updates the date to the current date whenever you open the spreadsheet. However, this script will save you the trouble of looking up the date and typing it on the day that you execute the script.