3 Replies Latest reply on Mar 21, 2011 1:08 PM by gkaiseril

    Modify this script for Time, not Date?


      I'm a complete newbie to scripting.  And I thought HTML was tough to pick up!


      I have this script-- apparently the only one I could find that comes close to what I need.


      // get new Date object
      var d = new Date();
      // format to mm/dd/yyyy
      var sDate = util.printd("mm/dd/yyyy", d);
      // insert date into form field
      this.getField("todaysDate").value = sDate;



      I need a script to perform this exact same operation but with the current system time (or MDT, that's fine).  I tried swapping out 'Date' for 'Time' but no go.  Anybody can help? 


      Much appreciated...