Google sheet update problem

I already create a apps flow this link 1
It's work good, but now I face one problem. when click update button for update data, every data show properly but only " date formate" not show properly. Its showing this formate
" 2018-07-11T18:00:00.000Z "
Add extra T18:00:00.000Z
I used " date piker components" for create data. Please see the image I think you understand everything.

Sir what I can do naw?

What do you want those textboxes/labels to show:




could it be that the label is just not wide enough to show the entire date string ?

I want to show only "day, month, year.
Example: 11-05-2021.

and the same in your spreadsheet ? You need to ensure that your "date" is a string and not a number when uploaded to google sheets. You can do this by adding an apostrophe - ' to the beginning of the date.

I suggest you use yyyy-MM-dd format (e.g. 2021-07-14) because this will sort alpha-numerically

Ok. I think you don't understand my problem.
When I create new data then No problem Date formate is ok. (11-07-2018)
But when I Update data then I face this problem Date formate change add extra data with date formate.
Create = 11-07-2018
But when date update
Show date format with extra data T18:00:00.000Z

See as I said above

You could also try editing your script to return display values instead of values:

@ Line 6 of script

var rg = sh.getDataRange().getValues();


var rg = sh.getDataRange().getDisplayValues();

and republish the script (and check the script url if using the new editor)

Adding this part automatically (T18: 00: 00.000Z) to the date function only when I select the update option. Which is very annoying for my next job.

@ 1st I change the sheet script.
@ 2nd I changed script url from block.
@ 3rd I have changed the date format mm-dd-yy to yy-mm-dd from appinventor & google sheet.

But there was no correction. I face same problem when I select update option. I hope you watch my video and understand the whole thing

Let me see if I can replicate your issue.

OK, after a bit of testing with my original CRUDII demo, I hopefully have the answer for you. As I suggested back in post 4 here, you do need to add an apostrophe - ' in order to set the date as a datestring in google sheets. You may have tried this and found that it reverted to the long date string after a further update. in order to overcome this you will need to edit your blocks.

Firstly you need to identify the indexes of the textboxes in your textboxes list that have dates:


in my example here I have identified textboxes with indexes 7 and 9

Next, you need to locate the procedure that sets the data, it should be at the bottom of the Procedures column of blocks:


You need to modify this so that an apostrophe is added when the data string is put together, like this:

If you have more textbox indexes, just add more or clauses to the if statement.

Finally, just check your number format in the google sheet for the columns that receive the dates. The number format should be set to automatic.

This should resolve the problem you are having with dates.

Aren't the ' marks supposed to be balanced, in pairs wrapped around whatever they're guarding?
I see only 1 ' added per column.

Never Mind- I get it now. It's a spreadsheet data type thing.

Yes, uncomfortable I know, but when entering a "number" and you want a "string" in a google sheet, just add an apostrophe at the start.

Thank very much everyone, for response my question. I have face another problem please give me solution anyone.
For example, After typing the blood group A (+) or A (-) in the text box of the apps, when I click on the submit button, Google sheet show only A automatic remove (+) or (-)
And if I use my title with a comma at the end of my name, the title will move to another column.!

Again, use an apostrophe at the start for your blood type, and replace commas with another character