Created
November 13, 2012 22:24
-
-
Save sauntimo/4068845 to your computer and use it in GitHub Desktop.
Google Apps Script Date Input handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create string version of date entered to be read by humans | |
NewSubmission["Delivery Date"] = NewSubmission["Day"] + "-" + NewSubmission["Month"] + "-" + NewSubmission["Year"]; | |
// create Javascript Date instance from date string | |
var OrderFor = new Date(NewSubmission["Month"] + " " + NewSubmission["Day"] + ", " + NewSubmission["Year"]); | |
// These properties aren't needed as we have NewSubmission["Delivery Date"] which is DD-MM-YYYY | |
delete NewSubmission["Day"]; | |
delete NewSubmission["Month"]; | |
delete NewSubmission["Year"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment