function setDate() { var ToDay = new Date(); var hh = ToDay.setHours(ToDay.getHours()+3); Xrm.Page.getAttribute("scheduledend").setValue(ToDay); }