Skip to main content

I am new to Zapier and working on a Zap that reads incoming emails using the Email Parser; however, I am running into an issue if the appointment spans midnight.  Unfortunately I do not have the duration of the appointment or the end date of the appointment, only the end time.

Looking for suggestions on how to calculate the time.  My thought was along the lines of IF(‘Endtime’ < ‘Starttime’, ‘Resdate’ +1d, ‘Resdate’).  This is easy enough in Excel but not finding a simple solution using the Zapier tools.  I was unsuccessful in getting the Formatter to calculate as I am missing the data I need to extract.

Parser Output sample:

  Parse Output Appttype: Hourly Rental
  Parse Output Email: emailaddress@gmail.com
  Parse Output Fname: Joe
  Parse Output Lname: Smith
  Parse Output Phone: 5555551212
  Parse Output Resdate: Friday, May 31, 2024
  Parse Output Starttime: 11:00 PM
  Parse Output Endtime: 1:00 AM

The OUTPUT to the Create Record in Zapier Table returns the current date for the Endtime (testing date 5/27/24):

  RESDATE: Friday, May 31, 2024
  STARTTIME: 2024-06-01T06:00:00Z
  ENDTIME:  2024-05-27T08:00:00Z

Any advice or assistance on how to handle this scenario would be greatly appreciated.  Ideally I would like to calculate the duration of the appointment as this would make it simpler to create the calendar event following the create record in the Zapier Table and provide me with more flexibility to address appointment duration changes.

Thank you!

Hi @LoftGolf 

Try this logic:

If Start Time contains PM and End Time contains AM, then +1d


@Troy Tessalone thanks, that would seem to be a good option.  Silly question though, where/how/what app would I use to insert this logic?  And what is the syntax?  Apologies, I only have 3 days of experience using Zapier.


@LoftGolf 

Paths or Filter:

https://help.zapier.com/hc/en-us/articles/8496288555917

https://zapier.com/apps/filter/help

 

Formatter > Date & Time > Add/Subtract Time

https://zapier.com/apps/formatter/help


Hi there, @LoftGolf 👋

Just wanted to check in here to ask how you’re getting on with this. Were you able to get the desired workflow set up using a path or filter to add the necessary logic?

Super happy to help further if you’re running into any issues on that at all - just let us know! 🙂