DateTIme Stamp formula not populating datetime field in a trigger - Forum - Rollbase - Progress Community

DateTIme Stamp formula not populating datetime field in a trigger

 Forum

DateTIme Stamp formula not populating datetime field in a trigger

  • 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; }
  • Try just
    (new Date()).getTime()

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