0
votes

I am trying to do the function below:

  1. Input the year, month and day into three corresponding cells on the spreadsheet.(say A1, B1, C1 = 2016, 7, 28)

  2. Generate the events on that day on the spreadsheet

I know that the Date format of google script is Date('July 20, 2015 20:00:00 UTC'). However, could I get the date without converting the month to string?

1

1 Answers

1
votes

Short answer

var date = new Date(2016, 7, 29);

Explanation

From: https://developers.google.com/apps-script/overview

Google Apps Script is a scripting language based on JavaScript that lets you do new and cool things with Google Apps like Docs, Sheets, and Forms.

So to create a Date object on Google Apps Script it's possible to use any of the valid syntaxes to call Date as a constructor.

References