Reputation: 3
I am trying to do the function below:
Input the year, month and day into three corresponding cells on the spreadsheet.(say A1, B1, C1 = 2016, 7, 28)
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?
Upvotes: 0
Views: 74
Reputation: 38160
var date = new Date(2016, 7, 29);
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.
Upvotes: 1