DateTIme Stamp formula not populating datetime field in a tr

Posted by Rollbase User on 07-Apr-2010 19:10

I am trying to use this script to populate a date/time field with a stamp when a certain button is pushed. It is not giving any errors but it is not populating the field when I execute the trigger. Any idea what could be wrong? var sel = {!functions#id} ; // might need quotes around this, like "{!function#id}"; if (/^(?:9885228)$/.test(sel)) { var time = Math.round(((new Date()).getTime()-Date.UTC(1970,0,1))/1000); return time; } else { return false; }

All Replies

Posted by Admin on 07-Apr-2010 21:23

Try just
(new Date()).getTime()

Why do you need 1970? This is already starting point for JavaScript Dates.

This thread is closed