Description;Variable / Modifier;Result
The date from the field (standard format);{{lead.cf(609635):df}};13.09.2024
The date in words (text format) (RU);{{lead.cf(609635):spell_date}};восемнадцатое октября две тысячи двадцать второго года
The modified date (day, month, year);{{lead.cf(609635):df(d F Y)}};22 December 2019
The date with the day of the week, day and month in Russian format (RU);доставим в {{lead.cf(609635):df(l,ru):noun_decl(4)}}, {{lead.cf(609635):df(d F,ru)}};доставим в воскресенье, 22 декабря
The current date (day);{{date.now:df(d)}};31
The current date (month);{{date.now:df(F)}} или {{date.now:df(d F,ru):split(s,2)}};December или Декабря
The current date (year, 4 digits);{{date.now:df(Y)}};1999
The current date;{{date.now:df(d F)}} {{date.now:df(Y)}};21 November 2019
The current date;{{date.now:df(d\.m\.Y)}};21.11.2019
The number of seconds that have passed since the beginning of the Unix epoch (January 1, 1970 00:00:00 GMT), can be used to calculate the difference between two dates or two time periods;{{date.now:df(U)}};1540846800
The example of calculating the difference in days between two dates in the fields of Kommo (we use both dates in UNIX-time, calculate the difference in seconds using the function CALC, the result is converted to days by dividing by 86400, the number of seconds in a day).<br>1801342 - ID of the first additional field in the lead card with the date<br>1801338 - ID of the second additional field;{{ (({{lead.cf(1801342):df(U)}} - {{lead.cf(1801338):df(U)}})/86400):calc }};21
/+7 days from the current date (convert date to UNIX format, add the necessary number of seconds and return to normal date format);{{ ({{date.now:df(U)}} + (7 * 86400)):calc:df(d\.m\.Y) }};15.01.24
/+7 days to the date from the field ( convert to UNIX, add the number of seconds for 7 days);{{ ({{lead.cf(609635):df(U)}} + (7 * 86400)):calc:df(d\.m\.Y) }};15.01.24
/+7 days from the date stored in the global variable;{{ ({nazvanie_peremennoy:df(U)} + (7 * 86400)):calc:df(d\.m\.Y) }};15.01.24
-1 day from the date in the field (convert to UNIX, subtract the number of seconds per day);{{ ({{lead.cf(609635):df(U)}} - (86400)):calc:df(d\.m\.Y) }};7.01.24
/+10 business days to the date from the field;{{lead.cf(609635):addworkdays(10)}};26.12.2021 -> 14.01.2022
/+7 business days to the current date;{{date.now:addworkdays(7)}};27.09.2021 -> 06.10.2021
The current date now without modifications (returns year, month, date, hours, minutes, seconds);{{date.now}};2020-02-03 13:18:14
Tomorrow from the current date (date and start time of tomorrow);{{date.tomorrow}};2020-02-04 0:00:00
Yesterday from the current date (start date and time of yesterday);{{date.yesterday}};2020-02-02 0:00:00
Tomorrow at the same time from the current date;{{date.next(day)}};2020-02-04 13:18:15
Next Wednesday at the same time from the current date;{{date.next(Wednesday)}};2020-02-05 13:18:15
In 7 days from the current time;{{date.custom(7 days)}};2020-02-10 13:18:14
Before 7 days from the current time;{{date.custom(-7 days)}};2020-02-03 13:18:14
Yesterday at the same time;{{date.custom(previous day)}};2020-02-02 13:18:15
Next Monday (beginning of the week) at the same time;{{date.nextweek}};2020-02-10 13:18:14
In a month, on the same day, at the same time from the current date;{{date.nextmonth}};2020-03-03 13:18:14
In a month, on the same day, at the same time from the date in the field;{{lead.cf(609635):dm(d\.m\.Y H\:i\:s,next month)}};15.06.2021 11:36:00 = 15.07.2021 11:36:00
Previous month, the same day;{{date.custom(-1 month):df(F, ru)}};2020-02-03 13:18:14
The date of the next specific day of the week (e.g. next Wednesday);{{date.next(Wednesday)}};2020-02-12 0:00:00
The last Monday of this month;{{date.custom(last monday of this month)}};2020-02-24 0:00:00
The last day of the previous month (day of the month);{{date.custom(last day of previous month):df(d)}};31
The last day of the next month from the date in the field as a full date (for example, the field stores 05.01.2021);{{lead.cf(620107):dm(d\.m\.Y,last day of next month)}};28.02.2021
If the day in the field is a working day (returns 0, if it is not a working day, and 1 for a working day);{{lead.cf(620107):isworkday}};14 августа 2021 > 0
Returns the text "Business day" or "Not a business day" depending on whether it is a business day in the lead field;{{lead.cf(620107):isworkday:if(=,0,Not a business day,Business day)}};11 августа 2021 > Business day
The next business day from the date in the lead field according to the format (d F Y);{{lead.cf(620107):nextworkday(d F Y, ru)}};11 августа 2021 > 12 августа 2021
The next business day from the current date;{{date.now:nextworkday(d F Y)}};11 August 2021 > 12 August 2021
The next business day from the date in the lead field +4 days;{{lead.cf(620107):dm(,+4 day):nextworkday(d F Y)}};11 August 2021 > 16 August 2021
The first business day of the next month from the date in the lead field;{{lead.cf(620107):dm(,last day of this month):nextworkday(d F Y)}};10 December 2021 > 10 January 2022
Change the date;{{lead.cf(620107):dm(,last day of this month):nextworkday(d F Y)}};10 December 2021 > 10 January 2022
Display the difference between the date from the field and the current date (by default days are written);{{lead.cf(682477):date_diff}};45
Display the difference between two dates with a forced indication of the display period. Note: Periods are not shifted between the two intervals in case of the overflow, if you do not specify the display of months, the "days" will remain the same, “15”;{{lead.cf(682477):date_diff({{date.now:df(U)}}, %m m. %a d.)}};1 m. 15 d.
Other variables for displaying the period of difference between two dates using date_diff: %Y - Years, number (01, 03), %y - Years number (1, 3), %M - Months, number (1..., 12), %m - Months number (1..., 12), %D - Days 2-days number (01, 31), %d - Days number (1... , 31). , 31), %a - Total number of days (4, 18, 8123), %H - Hours number (01, 03, 23), %h - Hours number (1, 3, 23), %I - Minutes number (01, 03, 59), %i - Minutes number (1, 3, 59), %S - Seconds number (01, 03, 57), %s - Seconds number (1, 3, 57), %R - Sign "-" for a negative number, "+" for a positive number (-, +), %r - Sign "-" for a negative number, blank for a positive;{{lead.cf(682477):date_diff({{date.now:df(U)}}, %m month %d days %h hours %m minute)}}<br>Note: Periods are not transferred between two intervals when overflowing. For example, if you do not specify the display of months, "days" will remain the same 28;1 month 28 days 23 hours 1 minute
An example of displaying the difference between two dates with declension by case (RU);{{lead.cf(583929):date_diff(, %m):noun_plur(месяц)}}<br>{{lead.cf(583929):date_diff(, %d):noun_plur(день)}}<br>{{lead.cf(583929):date_diff(, %h):noun_plur(час)}};11 месяцев 30 дней 13 часов
More possible options: Tomorrow midnight, the needed hour -15 minutes, N-th day of the week of the current or given month, etc.
More examples: www.php.net/manual/ru/datetime.formats.relative.php