Help? Google Script change Date

I used the script METRIC RAT AI2 - Google Sheets for AppInventor

To get data from selected row of google sheet

And I faced such a problem

there is a date in the table (for example, 24/10/2021)
after executing the script, the date changes to 10/23/2021

How to fix it?

ps as far as I understood it has to do with time zones

screenshots attached

@TimAi2 can help you
sorry for tagging

Maybe problem is caused by spreadsheet’s Locale settings


in a google spreadsheet is not a date(number), it is a string, using the en locale.

1 Like

If you export the complete sheet as csv then you can avoid this, I hope, instead of using gviz

Or change the date formate in gsheet and try, once get it into the app then you change the date format into the required format

to be honest, I didn’t quite understand your answer

but the format of this column in Google Sheets is set as date

iin settings
specified time zone GMT + 2

of course I can just change the time zone
but would like to find another solution

while i made such a temporary solution

changed timezone in settings

if someone knows a smarter solution
tell me
i will be grateful