Automatically calculate end date for Google Calendar events

  • 10 January 2022
  • 1 reply

I have an app that returns start and end date data of a booking and as well as a duration field with text that includes the number of hours or days for the duration (ex. 4D). I would like calculate the end date for Google Calendar insertion which is in the format yyyy-mm-ddThh🇲🇲ssss-0000.

I can use the Formatter in advance of the Google Calendar portion and manually enter a value … like ‘+4 days’ to the start date field, but since it would be anything from a 1 to say 14 days, would really like to do something like a string conversion like: VALUE(MID(string),2) but the formula reference doesn’t seem to have any text formulas other than VALUE.

There must be a way to do this … any suggestions? I do have hour durations as well, so would likely need to test with an IF state if I see 4H vs a 4D.



This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +9

Hi @Scooter 

You don’t have to enter ‘+4 days’ manually. You can just add ‘+%days% days’ in formatter > add time, where %days% is from the previous trigger step of how many days.

For hours, you can use different paths which should be relatively easy. Or you can use Spreadsheet style formula formatter or write a python code in Code by Zapier.