Answer the question
In order to leave comments, you need to log in
Why might new Date() not work in Google Script?
I make an empty script with one line:
When I try to run it, I write: "this is not a function, this is an object." And sends far and for a long time.
What to do?
added:
var CurDate = new Date();
Answer the question
In order to leave comments, you need to log in
There, most likely, some kind of JS dialect, and you need to look at the documentation for what they have instead of Date.
The solution is in the error message.
The author gives us 4 lines of code, and in the error the pointer refers to the 14th line.
Apparently, it was enough to refresh the browser page with the project or reset the browser cache to display the actual code.
The object Date
has nothing to do with it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question