# date\_diff

Функция date\_diff позволяет найти разницу в секундах/минутах/часах/днях/неделях/годах между двумя датами.

Формат функции:

```
[date_diff]тип|целевое время|начальное время[/date_diff]
```

<table><thead><tr><th width="204.36096482690414">Аргумент</th><th>Описание</th></tr></thead><tbody><tr><td>Тип</td><td><p><mark style="color:orange;"><strong>обязательный</strong></mark></p><p>Определяет, в какой единице измерения будет высчитана разница</p><p></p><p>Доступные значения:</p><p><code>seconds</code> - секунды</p><p><code>minutes</code> - минуты</p><p><code>hours</code> - часы </p><p><code>days</code>- дни</p><p><code>months</code> - месяца</p><p><code>weeks</code> - недели</p><p><code>years</code> - года</p></td></tr><tr><td>Целевое время</td><td><p><mark style="color:orange;"><strong>обязательный</strong></mark></p><p>Тип: <a href="/pages/p0GT5CdVgo20jg57ncHw">Дата и время</a></p><p></p><p>Время, разницу с которым необходимо найти</p></td></tr><tr><td>Начальное время</td><td><p><mark style="color:green;"><strong>не обязательный</strong></mark></p><p>По умолчанию: текущее время</p><p>Тип: <a href="/pages/p0GT5CdVgo20jg57ncHw">Дата и время</a></p><p></p><p>От этого времени будет искаться разница с аргументом &#x3C;Целевое время></p></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.leadconverter.su/funkcii/data-i-vremya/date_diff.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
