javascript - oldValue for dates in Google Apps Script -


i using onedit trigger trigger google apps script. essentially, using results of form populate calendar event. once i've created calendar event, want able keep in sync form entry. if edits form data, want edit calendar event. unfortunately, since there no geteventbyid storing eventid not enough.

i thinking might able use event['oldvalue'] stores event time figure out when event used (in case changes) list of events @ time allow me iterate through small number of events find calendar event.

unfortunately, date object comes out weird floating point number can't parse. e.g: 1/19/2016 20:00:00 comes out 42388.791666666664 don't understand.

i did have thought, should use regular http call event want? i'm not sure how within google apps script

maybe late, can see answer here

var x = 42521.015713761575;    // seconds in day = 24 * 60 * 60 = 86400  var date = new date(1899, 11, 30, 0, 0, x * 86400);


Comments