Timestamp in Google Sheets (with help from ChatGPT)

Anand
3 min readFeb 4, 2023

--

AI generated image

I wanted to test how easy it would be to use ChatGPT for tech support. So, I picked an example that I have often run into but never got around to solving effectively (note — I am not a frequent spreadsheet user, so the example is mainly to illustrate how well I can use ChatGPT for such help — there might be better ways to do this).

So here is my problem: I often need a column in a spreadsheet app, like Google Sheets or Excel, where I can manually enter the current date and time. I have never gotten this quite right with minimal effort. I decided to ask ChatGPT for help, and after some back and forth, found the formula. Here are the steps that work (the final response verbatim from ChatGPT, except italics, which are mine, for explanation and correction):

  1. Create a new column in your Google Sheets spreadsheet to store the timestamps.
  2. In the first cell of the timestamp column, enter the formula =TEXT(NOW(),"YYYY-MM-DD hh:mm:ss"). and press Enter to see the current time value here. This cell will often be updated, and is not a timestamp row of your data. It is just used as a source to create timestamps for other cells.
  3. Highlight the cell with the formula.
  4. Right-click the highlighted cell and select “Copy”. By highlighted cell we mean the timestamp formula cell created in step 2.
  5. Right-click the next cell in the same column and select “Paste special” then “Values only”.
  6. Repeat steps 4–5 for each new row you want to add a timestamp to.

This works for me. Thanks, ChatGPT!

That’s all you need if you landed here trying to solve this specific spreadsheet problem. Thanks for stopping by.

For those who are curious about the chat experience, read on.

It took quite a bit of back and forth to get this right. Remember, ChatGPT and other apps built on generative AI models are much better at creative content with higher acceptable variation than precise content like this one, where the steps have to be exact to work right. Such models often confidently give wrong answers, in a process called hallucination. One technique I have heard of to reduce the chance of wrong answers is to use a prompt that asks the bot to, if it is not extremely certain, say “I don’t know”. I did try that a couple times, but didn’t get it quite right. I could not find that exact prompt, and might be doing it wrong — it is often critical to get the words in your prompt exactly right for a certain effect to work.

Share your experiences with getting very precise responses to slightly complex questions from ChatGPT. How do you get around hallucinations?

In case you are curious about the AI generated header image, the header image was created entirely using AI tools that go from text to image. In this case, mainly Automatic1111’s stable diffusion web UI using the Deliberate model hosted on civitai (also available on huggingface), running locally on a mac with Apple Silicon (an earlier draft had an image generated using the really cool free text to image site called playgroundai).

--

--

No responses yet