If you are from the world of Microsoft Word users, inserting date/time is a cakewalk – and you know that already.
But in Google Docs, there is no straight-forward way to insert date or time into our Google Docs file.
To do that, we need to use the Google’s in-built Script Editor.
Let’s begin, and by the end of this blog post, you’d be able to simply click on a menu item to insert your current date or time, or even date in the long date format.
One quick note before we begin – here’s a video version of this blog post in case you wanted to see a quick (< 3 min) demo of how to insert date or time into your Google Docs file.
Subscribe to Tech Library TV
If the video didn’t play or you need more instructions, you can continue reading…
After you open your blank Google Docs file (remember this script works only on your current document, not on all your Docs files), go to Tools > Script Editor.
A blank ‘Untitled project’ opens with the Code.gs file ready to be edited.
You can simply remove all the existing code (nothing but an empty function).
Now go to my GitHub Gist (simply click the link to open in a new tab auto-magically) to copy and paste this code snippet into your Code.gs (script editor) OR alternatively simply copy and paste from the code below.
That’s all – you’ll now see a new menu called ‘Utilities‘ and three new menu items within that menu – one for each of the following:
- Insert Date
- Insert Time
- Insert Long Date
Hope you like this updated version of the code snippet.
Thank you, and I will see you again in another useful blog post just like this one.
If this helped you, please share this with your colleagues, leave a comment below or just simply take a walk enjoying the nature around you, while building a better ‘you‘ and thus building a better planet.