trouble with validation scripts

LabKey Support Forum (Inactive)
trouble with validation scripts Ben Bimber  2010-07-06 15:51
Status: Closed
 
should have seen that - thanks. one more question:

i have this line to provide a default for the timestamp (ts) field:
row.ts = new Date().format("Y-m-d");

that would normally work, but it throwing an error in the validation script. error below:

500: Unexpected server error
com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EcmaError: TypeError: Cannot find function format in object Tue Jul 06 2010 17:49:37 GMT-0500 (CDT). (queries/study/Arrival.js#56) in queries/study/Arrival.js at line number 56

Is there a reason why that would throw an error?

thanks.