davepar / gcalendarsync

Apps Script for syncing a Google Spreadsheet with Google Calendar
MIT License
161 stars 46 forks source link

Date/Time Issue - Can't Format #12

Closed sapDevAcct closed 7 years ago

sapDevAcct commented 7 years ago

I've been staring at this for more hours than I'd care to admit now, and I am about to give up. I had the script working really well, but keep running into this error: TypeError: Cannot find function getTime in object. I've tried every conceivable format for the date/time object, copying directly from the example spreadsheet, typing it in manually, etc. The trick seems to be (in the example) to get the time showing up in the formula bar but not in the actual cell, though I can't figure out how this is done. Pretty much all of my events are 'all day', so I have the end time field blank. I am really at the end of my rope! Any guidance would really be appreciated. My spreadsheet is here: https://www.dropbox.com/s/qgvgr7ymng28v6q/Daily%20Deals.xlsx?dl=0

Thank you!

davepar commented 7 years ago

I'm looking at this issue today. Looks like a prior change caused the problem. Sorry about that.

sapDevAcct commented 7 years ago

I was spending too much time wrestling with this issue and finally decided to just remove the code on my site that published the start/end time of an event in the rare occasion that they needed to be specified. I was using a conditional shortcode with Simple Calendar (http://docs.simplecalendar.io/event-template-tags/#tablepress-6).

I tried using the additional column for ‘all day event’ and setting the values to ‘TRUE’, but that didn’t seem to have any effect. The behavior was very unpredictable, and the script seemed to be very picky about the date format sometimes, and not others. It turned out that leaving the end date field blank was not acceptable, so now I have it as the same date as the start time, but wasn’t able to get it to create the events as ‘all day’. It just creates them with a start/end time of 12am - 12am.

It’d be nice if the Google Calendar could be accurate just in case I decide to publish the events elsewhere using Zapier. Now I am cheating sort of because I’ve configured Simple Calendar to just show that day’s event, ignoring the times. It is a great script anyway. I tried Zapier first, but ran into all kinds of problems. I was even able to modify it so that 2 websites/calendars can be managed from a single Google Sheet, with a unique tab/worksheet for each. Anyway, any assistance with this annoying issue would be appreciated!

davepar commented 7 years ago

This issue should be fixed now.

sapDevAcct commented 7 years ago

Thanks!         http://stoneagefarmacy.com/

On Dec 3, 2016, at 4:56 PM, Dave Parsons notifications@github.com wrote:

This issue should be fixed now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Davepar/gcalendarsync/issues/12#issuecomment-264674053, or mute the thread https://github.com/notifications/unsubscribe-auth/ATsdzPAlO_eaOit-RnGuf0IKphUVkqApks5rEgGYgaJpZM4K-gwO.