K
K
Klohtun2015-06-04 15:11:19
Google Apps Script
Klohtun, 2015-06-04 15:11:19

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();

6d2bf13f923d468897659a959d767b8c.jpg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Kitmanov, 2015-06-04
@k12th

There, most likely, some kind of JS dialect, and you need to look at the documentation for what they have instead of Date.

S
scapp, 2015-06-04
@scapp

Yes, everything is in order with GS, your code is working, look further

A
Alexander Ivanov, 2020-06-15
@oshliaer

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 Datehas nothing to do with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question