Anyone know how to add six months to the expected close date via Script. I have tried to do this on the Page Init and can get the date value. However it is not in the right format. This works and puts the date that I want in the field but the format is all wrong. Any help on what function to use or how to do this would be great. Thanks.
var expClosed = new Date()format;
var currentMonth = expClosed.getDate();
expClosed.setDate(currentMonth + 180);
alert(expClosed);
nlapiSetFieldValue('expectedclosedate',expClosed) ;