As mentioned in the title, I am trying to set an automation using the code below that moves entire rows based on a row's specific cell value (date) being in the past. The column containing that date is "L" if that helps, I am unsure where to use this if necessary, is this within the getDataRange function? The date information I am using is in the current format: 1/25/2021 19:30:00
When I run the code below it gives me the 'Execution Completed' notice but it doesn't appear to be moving the rows across into the destination sheet (Auction Results).
To provide further context the Original sheet is called Collecting Cars - Live and today's date is saved in the sheet App Rules in B1.
function MovetoPastShows2() {
function MovetoPastShows2() {
var ss = SpreadsheetApp.getActive();
var sh=ss.getSheetByName('Auctions - Live');
var rg=sh.getDataRange();
var vA=rg.getValues();
var today=new Date(ss.getSheetByName('App Rules').getRange('B1').getValue()).valueOf();
var dsh=ss.getSheetByName('Auction Results');
var d=0;
for(var i=0;i<vA.length;i++) {
if (new Date(vA[i][2]).valueOf()<=today) {
dsh.appendRow(vA[i])
sh.deleteRow(i+1-d);
d++;
}
}
}