Create a custom function that stops workflow actions

Create a custom function that stops workflow actions

Hi,

I have set up a workflow and it's working great, however I'd like to stop it if a certain date/time has been reached.

We have an event, however if people are late registering then they will miss out on a certain time-based offer and I'd like to stop the trigger that sends out a certain email.

I was thinking if it was within an if statement like:
  1. if(zoho.currenttime >  '17-Jul-2017 12:00' )
  2. {
  3. //SOMEHOW STOP THE CURRENT WORKFLOW
  4. }
Is this possible?

Regards,
Stephanie