AnsweredAssumed Answered

Convert Date String to a Regular Date Format

Question asked by mhuynh on Sep 26, 2016
Latest reply on Oct 7, 2016 by mhuynh

I've used the custom javascript below to get the next occurring "Tuesday" date based from the date my form is opened. Can anyone help me with a way to convert this date string to display it regular format, "9/27/2016" ?  Thank you.

 

 


function xnextSession() {
  var ret = new Date();
  ret.setDate(ret.getDate() + (2 - 1 - ret.getDay() + 7) % 7 + 1);
  return ret;
}

 

NWF$(document).ready(function(){
  NWF$('#'+NextMeetingDateID).val(xnextSession);
});

Outcomes