Dear all,
Please help to set desired date format (dd-mm-yyyy) to a text box. When I got a data (date) from Google sheet, I was unable to get my desired format Even though correct format in Google sheet cell.
Show the exact string (date) that comes back from the google sheet. Does it come back as a (date) number or a string. How is the date setup on the google sheet as a string or as a formatted date number?
But in my app
Why is the T1 (1 & T) being included ? (Not sure why it is backwards, or is the beginning of the time part of the date. Please show the raw data returned in responseContent.
One way to handle this with blocks is like this:
(Draggable to Blocks editor)
You can change the hyphen separator -
to a slash /
if you want, when setting the date.
OK sir. I try this. Thanks a lot for spending time for me.
With at(list)
If you used a google apps script to return your sheet contents, you could use:
getDisplayValues()
to return the dates as they look on the sheet
Yes. I have used Google apps script for this app
Yes. This one is a good idea. Thank you.
a simple example (for a script bound to spreadsheet):
function doGet(e) {
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheetByName('Sheet1');
var range = sh.getDataRange();
var data = range.getDisplayValues();
return ContentService.createTextOutput(JSON.stringify(data));
}
Great sir.
In your CRUDQ II apps script, Can we replace "getDisplayValues()" instead of "getValues()"?
Try it, see what happens
Excellent Sir. It works well. In my app, i have used your CRUDQ II apps scrip in my google sheet.
Thank you very much. now i am able to read and update data including dates.
Is there any shortest method to find interval between two different dates? (For example date1 is 01-04-2021 and date2 is 16-04-2021 then the answer - interval is 16days.)