Filter array by date with google app script

后端 未结 3 1862
南笙
南笙 2021-01-22 03:08

i\'ve a google spreadsheet that is a 2 columns table that has on column A dates (i\'m sure that are dates, and all the date functions works fine on all the column) and on column

3条回答
  •  無奈伤痛
    2021-01-22 03:51

    Try this

    var filtered = data.filter(function (row) {
    
      var d = new Date( row[1] ); // change text to Date object
      return  d.getFullYear() === 2016; // then compare
    
    });
    

提交回复
热议问题