Read FAQ
NEW
Bitrix24 Support
Registration and Authentication
How to start
My Profile
Feed
Chats and Calls
Calendar
Bitrix24.Docs
Bitrix24.Drive
Bitrix24.Mail
Workgroups
Tasks and Projects
CRM
CoPilot - AI in Bitrix24
Contact Center
Sales Center
CRM Analytics (beta)
BI Builder
Sales Intelligence
Inventory Management
Marketing
Sites
Online Store (beta)
CRM + Online Store
CRM Store (beta)
Bitrix24.Sign
Company
Knowledge base (beta)
Automation
Workflows
Telephony
Market
Subscription
Settings
Enterprise
Mobile App
Desktop App
General questions
Bitrix24 On-Premise

Bitrix24Care

Dateadd function

The dateadd function allows you to add a certain number of years, months, days, hours, minutes, and seconds to the specified date.

This is how it looks:

=dateadd([start_date], [what_to_add])

In the [start_date] section, you can use variables, template parameters, or entity fields. Also, you can enter any date manually or set the current time and date using {=System:Now}.

In the [what_to_add] section, set the desired time unit using the corresponding values:

Unit Value
Year y
Month m
Day d
Hour h
Minute i
Second s

Use + and - signs to add or subtract the specified value from [start_date]. For example:

=dateadd({=Document:DATE_CREATE}, "+1d"): The resulting date will be 1 day later than the document creation date.

=dateadd({=Document:DATE_CREATE}, "-21d"): The resulting date will be 21 days earlier than the document creation date.

The dateadd function does not change the date specified in the [start_date] section. If you use the creation date of an item, this date will not be modified. The function uses it and adds the value specified in the [what_to_add] section. To save the resulting date value, insert it in a separate field or variable.
Learn how to insert values using special macros

Use case

The function is commonly used to automatically calculate the deadline for a task based on its creation date. Let's consider the following example and create a task that needs to be done in 10 days.

  1. Add the Create task activity to your workflow.

  2. Insert =dateadd({=System:Now}, "+10d") in the Deadline field.

  3. Run your workflow to create a task. The deadline will be set 10 days after the creation date.

To use the resulting date as text in notifications, tasks, or Feed posts, enclose the function in curly brackets:

{{=dateadd({=Document:DATE_CREATE}, "+1d")}}

Was this information helpful?
Integration specialist assistance
That's not what I'm looking for
Complicated and incomprehensible text
The information is outdated
It's too short. I need more information
I don't like the way this tool works
Go to Bitrix24
Don't have an account? Create for free