Redash To Google Sheets Using Google Script - How Do I Add The Date At The End?
I'm trying to use the following Google script to add data from Redash, then add the current date at the end. Where could I add a var now = new Date(); to input the date on the las
Solution 1:
Well, you row number addressing is a bit confusing, cause sheet.getLastRow() would change every time you add values after the last row, but you can write something like
sheet.getRange(sheet.getLastRow() + num1, 6).setValue(newDate());
to insert date. You can refer other answers, like
How to format a JavaScript date
Baca Juga
- I'm Trying To Make An Id Searcher Which Does A Thing When You Input The Right Id. However, The If Statement Always Runs. Why Is This?
- Gas: How To Change A Global Variable Value And Preserve Its Changed Value When Using The Variable In A Handler Function?
- Google Apps Script - Using For Loop To Pull Data From Range Based On Condition
for date formatting.
Post a Comment for "Redash To Google Sheets Using Google Script - How Do I Add The Date At The End?"