Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I use PSPad as a text editor, which allows you to press Alt + D to insert a timestamp, e.g.:

2010-07-17 23:45:44

Is there a way to do this in a Google Spreadsheet?

share|improve this question
This would be helpful in using a Google document as something like an engineering log. +1. –  Thomas Owens Jul 17 '10 at 22:54
yes, I use google docs as external datasources for websites and would like to be able to timestamp for this reason –  Edward Tanguay Jul 17 '10 at 23:17

8 Answers 8

up vote 8 down vote accepted

I use AutoHotKey to perform this function.

AutoHotKey is a Windows scripting application and language.

The code I use is below, it would be easily modifiable to insert the time and change the slashes to hyphens if that is what you prefer.

+!d:: ;Shift-Alt-D: Insert current date
SendInput %A_DD%/%A_MM%/%A_YYYY%
share|improve this answer
yes, autohotkey is my friend, odd I forgot about it for this, I used %A_YYYY%-%A_MM%-%A_DD% %A_Hour%:%A_Min%:%A_Sec% and it works perfectly, thanks! –  Edward Tanguay Jul 18 '10 at 8:32
No worries, glad I reminded you :) –  tobeannounced Jul 20 '10 at 22:28

I created a little script that converts the string literal "_now" to current datetime -

function onEdit(e) {
  if (e.range.getValue() == "_now") {
    e.range.setValue(new Date());

I find it pretty handy to type _now and have it convert to current datetime value.

See https://developers.google.com/apps-script/quickstart/macros and https://developers.google.com/apps-script/understanding_events for more info on how to add this to your Google Spreadsheet

share|improve this answer
Power to Google Apps Script –  Jacob Jan Tuinstra May 20 '13 at 8:56
This one should be the answer if considering across all platforms not just for windows. –  Robert Dec 24 '14 at 15:10

The formula for spreadsheets is =now()

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

That's not a timestamp though, is it? It's just showing the current date/time when the spread sheet was opened, no? –  Al E. Jan 9 '13 at 1:31

Google Docs supports the following keyboard shortcuts:

  • Ctrl + Shift + : is the keystroke to insert time.

  • Ctrl + ; is the keystroke to insert date.

See Keyboard accelerators, mnemonics, and shortcuts for more details.

share|improve this answer
This is similar to Microsoft Excel, however, unlike Excel you can't seem to follow one shortcut with another in order to produce a complete timestamp. The shortcut in Google Docs only seems to work when the entire cell is selected, not when it is being edited, so you can only get the date OR the time with this method, not both. –  w3d Jul 9 '12 at 14:21
Nice! Note, this only works for Spreadsheets, not Documents. –  jimmyorr Sep 7 '12 at 17:26

There is an easy way to do it using the script gallery. There is a good video which shows you how to do it. Have a look at this: https://www.youtube.com/watch?v=s7B0bzVvcL8

share|improve this answer
Answers should stand on their own. Without the information at the other side of the link there is no useful information here. –  Al E. Oct 11 '12 at 0:29

You can put in a bookmarklet with this location:

javascript:var thetime=new Date();var txtNode=document.createTextNode((thetime.getMonth()+1)+'/'+thetime.getDate()+'/'+thetime.getFullYear()+' '+thetime.getHours()+':'+thetime.getMinutes()+':'+thetime.getSeconds()); var myInputNode=document.getElementsByClassName('cell-input')[1]; if (myInputNode.hasChildNodes()) {  myInputNode.replaceChild(txtNode, myInputNode.childNodes[0]); } else { myInputNode.appendChild(txtNode); }; void(0);

then edit the cell and click the bookmarklet.

share|improve this answer
  1. In a nearby cell, or within a frozen pane, input =today() into a cell to get the current date.
  2. Copy the cell, and then use (Paste special → Paste values only) from the edit menu, to get a static date and time, at the time that you pasted the value in the cell that you wanted the date stamp.
share|improve this answer

Google Docs doesn't support it, but you can try another workaround without external apps:

  1. Insert a comment (Ctrl + M)
  2. Copy the TimeStamp from there (Ctrl + X or Ctrl + X)
  3. Delete the comment (Right click > Delete)
  4. Paste the TimeStamp (Ctrl + V)

(If you are on a MacOS, use Cmd instead of Ctrl for Copy/Cut/Paste, but Ctrl + M for inserting the comment, because Cmd + M is minimizing the window.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.