I copy and paste mail merge scripts from a third party source, it works awesome except for one thing
When I write a date in my form (eg July 7, 2012) the script in the mail merge is converted to the date dated (pre 7 July, 2012 00:00 GMT).
I want to remove the unnecessary date after the date. Can you help me
Here is the part of this code that is most relevant to this problem: // Set up the current timestamp and time zone. Time zone = Meriwaryals Sheet.GetRenz ("B13"). GetValue (); Date time = myVariablesSheet.getRange ("B7"). GetValue ();
if (type of timezone == 'undefined' || timeZone == '') {timeZone = 'GMT'; } If (typef.datline == 'undefined') = dateline == '') {dateline = utilities. Format date (new date), time zone, "EEE, MMM, D," ';');} Else {dateline = Utilities.formatDate (Dateline, Time Zone, "EEE, MMM D," "Yes"); } If (debug) browser Mmsgox ("datalines =" + timeline + "\ ntimeZone =" + timezone); I think you are asking to format a date.
If you want a formatted date as July 9, 2012, you will need to enter 'MMMM D, YAY'.
By the way:
logger.log (Utilities. Format Date (New Date), 'PST', 'MMMM D, Yes'))
Comments
Post a Comment