im just learning google app script, and this problem really puzzling me. so, pretty please some help.
so, i am have this Google Sheet that collects responses from Google Form. This form has "Date" response on it, so i assume i always get the correct date format since it is automaticly generated ny sistem. But when i take the value in google app script, in
(DataObject[4].getDate()).toString()
it return yesterday value. so, if the value in Google sheet written "4/8/2022" i get "7" value in script app, instead of "8". (DataObject[4] is the variable where i store date value)
i already tried to add +1 in the script, like in
(DataObject[4].getDate()+1).toString()
but i got problem when the real date is "4/1/2022" the value become "32" (since march have 31 days).
is there something i did wrong?