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!