javascript get date without time code example
Example 1: javascript get date without time
function WithoutTime(dateTime) {
var date = new Date(dateTime.getTime());
date.setHours(0, 0, 0, 0);
return date;
}
Example 2: google script get date without time
setValue(new Date(new Date().setHours(0,0,0,0))).setNumberFormat('MM/dd/yyyy');