Skip to main content

Using sub_time() to Subtract Minutes from a Time Field in CRM Expressions

Using sub_time() to Subtract Minutes from a Time Field in CRM Expressions

Overview

The sub_time(timefield, minutes) function appears in the Use Function dropdown of the CRM expression formula builder and can be used to subtract a specified number of minutes from a time field. However, this function is not documented in the official Dazos Expressions User Guide, and its behavior may be inconsistent or unreliable in some scenarios.


This article explains what the function does, how to locate it, and what alternatives are available if you need stable, predictable results.


When to Use / Why It Matters

You may want to calculate a time value that is a set number of minutes before a recorded time — for example, displaying or storing a time that is 30 minutes before an appointment or intake time field.


The sub_time() function is the available option within CRM expressions for this purpose, but customers should be aware of its limitations before relying on it in production configurations.


What Is sub_time()?

  • Function name: sub_time(timefield, minutes)

  • Purpose: Subtracts a specified number of minutes from a time field value

  • Where to find it: In the CRM expression formula builder, open the Use Function dropdown — sub_time is listed there

  • Documentation status: Not included in the official Dazos Expressions User Guide — use with caution

How to Locate the Function in the Formula Builder

  1. Navigate to the CRM module where you want to create or edit an expression

  2. Open the Expression Formula Builder

  3. Click the Use Function dropdown

  4. Locate and select sub_time from the list

  5. Configure the function with your time field and the number of minutes to subtract (e.g., sub_time(AppointmentTime, 30) to subtract 30 minutes)

Tips & Notes

⚠️ Important: Because sub_time() is not officially documented, its behavior may be inconsistent or produce unexpected results in certain configurations. It is not a fully confirmed supported feature.


💡 Tip: If you need reliable and stable time subtraction results, the recommended alternative is to calculate the adjusted time value outside of CRM expressions — for example, via an API workflow or in the source system that sends the value — and then save the pre-calculated result to the field.


Best Practice: Test sub_time() thoroughly in a non-production or test record before using it in live workflows or reports to confirm it behaves as expected in your specific use case.


Recommended Alternative for Stable Results

If consistent and predictable time arithmetic is critical, handle the calculation externally before the value reaches Dazos CRM:

  • API workflow: Calculate the adjusted time (e.g., appointment time minus 30 minutes) in your integration layer and write the result directly to a CRM field

  • Source system calculation: Perform the subtraction in the system that originates the data before sending it to Dazos

This approach avoids any uncertainty related to expression engine behavior with time values.


Related Resources

  • Troubleshooting Date/Time Field Update Issues in Workflows (CRM)

  • Update Calendar/Time Stamp Settings in Dazos CRM (CRM)

  • Contact Dazos Support if you need help testing sub_time() in your specific configuration

Did this answer your question?