Unanswered question

TypeError: Cannot find function getDate in object?

The following lines in a JS library:
var c_sysDate = Date();
var c_date = c_sysDate.getDate();

are producing the following error log entry:
JS library compilation error detected. Cause: org.mozilla.javascript.EcmaError: TypeError: Cannot find function getDate in object Fri Oct 25 2019 10:32:29 GMT-0400 (EDT).

All the documentation I have found indicates that getDate() is a standard Date library function. How can this be overcome?

Donald E.
Donald E.

Donald E.

Level
0
3 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

If you use that code that should work:

var c_sysDate = new Date();
var c_date = c_sysDate.getDate();

By the way have you tried the NeoLoad date variable which may suit your needs too.