I am trying to match two different responses of same Date field in Google Form
For that for one cell I am accessing its value from the spreadsheet generated by filling its response and for other I am accessing its value from the last response generated by filling second form
In first by observing log, it stored value in this format in spreadsheet
"Tue Jan 03 00:00:00 GMT+05:30 2017" (without quotes)
and other stored value in this format "2017-01-03"
And I want to compare these two values, I know if I access the spreadsheet of 2nd form it will be easy to compare but can I compare it in this format for which I don't need to access other form's spreadsheet?
Edit: I tried to compare cells of both spreadsheets but both of them also had different formats
In second spreadsheet format was like
"Thu Mar 16 2017 00:00:00 GMT+0530 (IST)"
Google Spreadsheet datetime conversion
863 Views Asked by AAMBol At
1
There are 1 best solutions below
Related Questions in GOOGLE-APPS-SCRIPT
- How to use custom font during html to pdf conversion?
- parameter values only being sent to certain columns in google sheet?
- AppScript to replace image in google slides
- Email Sent Using AppScript Appears in Sent Box, but does not appear in Recipient's Inbox
- Update a MySQL row depending on the ID in Google Sheets Apps Script
- Would like the script to return the PDF letter via email with the sheet name not the spreadsheet name
- App script to prevent duplicate form submission
- Redirect Users to another website using GAS
- How do I create a Line Graph on App Script?
- Error (Status of 500) and X-Frame-Options with google apps script redirect function
- How do I add the Luxon library google sheet script
- AppScript For Google Form
- google sheet script to convert the Scientific notation in the selected area to number
- onEdit() 'row is not defined' error using checkboxes
- Regex expression not working on Google Form
Related Questions in GOOGLE-SHEETS
- google sheets, search and replace for next colum
- AppScript to replace image in google slides
- Regex to match repeated substring in Google Sheets
- How to append row to specific columns with gspread?
- Find a value in a range of cells (multiple rows and columns)
- Create date column based on range
- Look up a value using month of the date
- Data recovery based on other data
- Gsheet - Automatically send an email using a date & time in a Cell
- google sheet script to convert the Scientific notation in the selected area to number
- How can I limit the number of dropdown entries in a column in Google Sheets
- Parse tag in html via Google Sheets (importxml)
- Why is the background color of my google sheet web app not being applied?
- Google Sheets script that automatically locks a sheet 24 hours after a cell is edited
- My Google Sheets formulas mysteriously break as time passes, fix themselves when refreshed
Related Questions in GOOGLE-FORMS
- How to redirect to thank you page after submitting a Google form embedded into a Google Site?
- App script to prevent duplicate form submission
- Regex expression not working on Google Form
- Go to the Next section in Google Forms after an option is selected using App Script
- Installable Trigger not being installed in published Google Forms Editor Add-On
- Split Google Form response to rows by sections with constant header columns
- How to google form with multiple sections, each section with a dropdown list, populate from Google sheet
- Create a new row entry in a google sheet with google form questions answers each time someone submits their answers
- How to load data from an excel sheet and make populate options for a survey?
- Get responseURL when intergrate Google Form API
- Choices Set To a Section, Next Section, or Submit Form in Google Forms
- How to enable single and double quotes and marks in a regular expression in a paragraph Question in Google Forms?
- Can I Have a Filter Dynamically Update on Google Sheets?
- Integration of Google Form with Salesforce causing "405 METHOD_NOT_ALLOWED" error
- Forms-Sheets Students automatically change seats in limited workshops, based on conditions
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The value "2017-01-03" is a string. It carries no information about a timezone with it, so it's something you need to know (from the context in which you collected the form). Perhaps it's Asia/Kolkata, the Indian time? If so, I would format the first date as the string, using the same timezone, and compare the two.
(One can also test inequalities on strings formatted in this way,
str < val2str).Another approach would be parse the second string into a date object, but this is somewhat more complicated as the Google Apps Script date parser is finicky.