How to Insert Timestamp in Google Sheets

How to Insert Timestamp in Google Sheets

Google Sheets is a great tool, especially when you are collaborating with your colleagues and working on the same sheet. The program allows you to work on the sheet simultaneously.

When it comes to inserting a timestamp in your Google Sheets, you can either do it manually using shortcuts or automatically using the date and time functions. There are more than one ways to include a timestamp in Google Sheets. This is a useful feature, so you better know how to use it.

If you are confused about how to insert Timestamp in Google Sheets, we have got your back. In this post, we will provide a detailed guide to perform the steps. We will cover all the methods, so you can follow the one that you find easy. For convenience, we have explained each of the steps in detail, so there’s no confusion. That said, now let’s take a look at the steps given below.

Steps to insert timestamp in Google Sheets:

  1. Open Google Sheets:
Insert Timestamp in Google Sheets

Insert Timestamp Using Keyboard Shortcuts:

To manually insert the time and date you can use key board shortcuts:

Here are the keyboard shortcuts:

  • To insert the current date: Control + : (hold the Control key and press the colon key).
Insert Timestamp in Google Sheets
  • To insert current time: Control + Shift + : (hold the Control and Shift keys and press the colon key).

Insert Date and time using functions:

To insert date and time you can use functions too

To insert current date use the following formula in cell:

=TODAY()

To insert current date and time use the following formula:

=NOW()

Automatically Insert Date and Time Using a Script:

Here are the steps to automatically insert time and date using scripts:

  1. Navigate to Tools > Script Editor:
  1. Now in the script editor code window , copy paste the following code(Source: Stackoverflow):
function onEdit() {

var s = SpreadsheetApp.getActiveSheet();

if( s.getName() == "Sheet1" ) { //checks that we're on the correct sheet

var r = s.getActiveCell();

if( r.getColumn() == 1 ) { //checks the column

var nextCell = r.offset(0, 1);

if( nextCell.getValue() === '' ) //is empty?

nextCell.setValue(new Date());

}

}

}
  1. Now, save the code:
  1. Next, Run the code:
  1. Now when you enter anything in cells in column A, a timestamp would automatically appear in the adjacent cell in column B.