I have an array of dates with different times in the date.
Example: {4/15/13 05:00:00, 03/10/13 13:00:00, 02/10/13 02:00:00, etc.}
If I wanted to change just the hour to 00:00:00 so the array would read:
{4/15/13 00:00:00, 03/10/13 00:00:00, 02/10/13 00:00:00, etc.}
How would I do that?
I've tried using getTime(), but I don't have control over just the hours. Any help would be great. Thanks!
EDIT: I tried this loop:
for (var i = 0; i < gValues.length; i++) { // repeat loop
sheet.getRange(i + 2, 7, 1, 1).setValue(gValues[i][0].setHours(00,00,00,00));
}
But instead of the desired result, I get this value: "12/20/5828963 0:00:00" for every single cell.