

That will place the current time into the cell. Hold down both the Ctrl and Shift keys and press the (semicolon) key. If( s.To insert the current time, click on the cell where you want to store the current time. In the script editor code window, copy-paste the following code (the credit for this script goes to Stackoverflow):.This will open the Script Editor in Google Sheets. This can be done with a simple script in Google Sheets.īelow are the steps to use a script to automatically add timestamps in Google Sheets: While both the above methods (keyboard shortcuts and formulas) work well, these would not automatically insert the timestamp for you.įor example, suppose you have a dataset where you’re tracking activities and you want a timestamp to be inserted as soon as an activity is added to a cell. Automatically Insert Time Stamp in Google Sheets Using a Script Similarly, with time, you can display it in the AM/PM format or in 12/24 hour format. This allows you to format the result and show it in different formats.įor example, if you have a date as 01-01-2020, below are some of the formats you can use to display it: In case you want these to be static values, you can convert the formula to value (or use the keyboard shortcuts covered above).Īlso, the result of these formulas is a number (as all date and time values are stored as numbers in Google Sheets). So if you use the TODAY function in a cell and open that Google Sheet document the next day, the formula will update to show you the current date. Note that these formulas are volatile, which means that if you change any cell in the Google Sheets document, it will lead to a recalculation and make these formulas to update. To insert the current date as well as the current time, use the below formula: =NOW() To insert the current date, use the below formula: =TODAY() There are a couple of formulas that you can use to quickly insert the date and time in Google Sheets. Remember to convert the formula to value to make sure the combined timestamp (with date and time) is a static value (hint: use Paste Special to do this). In case you want to get a combined value of date as well as time, you can first use these two keyboard shortcuts to insert the date and time and then simply add these two cells (as shown below). This means that if you make any changes in the worksheet or close and open it, these date/time values will not change. Note that these keyboard shortcuts would insert a static date and time value. To insert the current time Control + Shift + : (hold the Control and Shift keys and press the colon key).

To Insert the current date Control + : (hold the Control key and press the colon key) If you want to quickly insert a timestamp in one cell (or a few cells), you can use the below keyboard shortcuts: Automatically Insert Time Stamp in Google Sheets Using a Script.
