setting second to zero in js date code example Example: javascript new date zero time var d = new Date(); d.setHours(0,0,0,0);