Hi,
I have some products data with expiry date for each product in my google sheet. Every day i want to check what are all the products that will expire in next day. I want to know how can i add one day to a date, below is my code but its not working. Its concatenating the days rather adding the number of days to a date.
now = Utilities.formatDate(new Date(), "IST", "MM/dd/yyyy");
var expDate = new Date(now + 1);
//appdata = i am getting all the records to this varibale as a range
for (i in appdata)
{
var rec = appdata[i];
if (rec[0] != "")
{
//expiry date in 8th column
appDate = Utilities.formatDate(rec[8], "IST", "MM/dd/yyyy");
if (appDate == expDate)
<my code continues ...>
Any one please help me on this, i googled much couldn't find a solution ....