I'm trying to create a Google App Script that adds one month to a date already on a Google Spreadsheet. In the example below I was trying to take the date from cell B2 (1/1/16) and add one month and then place the new date in cell B4 (2/1/16). Using the script below I get the result of 1454313600000 instead of 2/1/16. I haven't been able to figure out what I need to do to get a result of 2/1/16.
function myFunction(DateTest) {
var spreadsheet = SpreadsheetApp.getActive();
var sheet = spreadsheet.getSheetByName('Sheet1');
var value = sheet.getRange('B2').getValue();
var a1date = value.getMonth();
var newdate = value.setMonth(a1date+1);
sheet.getRange('B4').setValue(newdate);
}