I'm fairly new to coding, and am trying to get my head around a problem for some work admin. I´m hoping there's a quick and simple fix to this.

So as the title says, we enter info on a google form and then use the responses on sheets to complete a google doc (form). I need to set the date format to show as dd-mmm-yy, so that there is no confusion in a multinational team.

Here is my script so far (courtesy of a web tutorial - sorry can't remember where from) enter image description here

Many thanks in advance for any help,



1 Answer 1


Use Utilities.formatDate(), like this:

  const timestamp = Utilities.formatDate(new Date(e.values[0]), 'GMT', 'd-MMM-yyyy');
  • Many thanks for the prompt reply! - maybe a daft question, but where do I need to insert this line of code?
    – Chris
    Oct 18, 2021 at 8:39
  • Replace the var timestamp line with it. You can use const or var per your choice. Oct 18, 2021 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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