I have a variable 'var timeStamp = finalData.obj.followers[0].timestp;'
that logs '2020-04-15T00:00:00.000Z.'
I only want the date, and not the timezone, so I used the variable below to parse the data.
I used a new variable 'var formattedDate = Utilities.formatDate(new Date(timeStamp), Session.getScriptTimeZone(), "yyyy-MM-dd");'
and this one logs '2020-04-14.' It seems to be working, but it is a day behind. It should log 2020-04-15, as it is in the first log. Is there a way to fix this?
I am using Google Apps Script.