mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Russian translation
This commit is contained in:
parent
76bb1a569f
commit
8a94e9610e
@ -191,9 +191,8 @@ SELECT now() AS current_date_time, current_date_time + INTERVAL '4' day + INTERV
|
|||||||
You can set the period without using `INTERVAL` by multiplying seconds, minutes, and hours. For example, a period of one day can be set at `60*60*24`.
|
You can set the period without using `INTERVAL` by multiplying seconds, minutes, and hours. For example, a period of one day can be set at `60*60*24`.
|
||||||
|
|
||||||
!!! note "Note"
|
!!! note "Note"
|
||||||
Syntax `now() + 60*60*24` doesn't consider time settings. For example, daylight saving time.
|
Syntax `now() + 60*60*24` doesn't consider time settings. For example, daylight saving time. The `INTERVAL` syntax or `addDays`-function is always preferred.
|
||||||
|
|
||||||
The `INTERVAL` syntax or `addDays`-function is always preferred.
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -207,26 +206,6 @@ SELECT now() AS current_date_time, current_date_time + 60*60*96;
|
|||||||
└─────────────────────┴─────────────────────────────────────────────┘
|
└─────────────────────┴─────────────────────────────────────────────┘
|
||||||
```
|
```
|
||||||
|
|
||||||
``` sql
|
|
||||||
SELECT now() AS current_date_time, current_date_time + 60*60*24 + 60*60*2;
|
|
||||||
```
|
|
||||||
|
|
||||||
``` text
|
|
||||||
┌───current_date_time─┬─plus(plus(now(), multiply(multiply(60, 60), 24)), multiply(multiply(60, 60), 2))─┐
|
|
||||||
│ 2021-06-12 17:36:30 │ 2021-06-13 19:36:30 │
|
|
||||||
└─────────────────────┴──────────────────────────────────────────────────────────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
``` sql
|
|
||||||
SELECT now() AS current_date_time, current_date_time + 60*23;
|
|
||||||
```
|
|
||||||
|
|
||||||
``` text
|
|
||||||
┌───current_date_time─┬─plus(now(), multiply(60, 23))─┐
|
|
||||||
│ 2021-06-12 17:38:02 │ 2021-06-12 18:01:02 │
|
|
||||||
└─────────────────────┴───────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
**See Also**
|
**See Also**
|
||||||
|
|
||||||
- [Interval](../../sql-reference/data-types/special-data-types/interval.md) data type
|
- [Interval](../../sql-reference/data-types/special-data-types/interval.md) data type
|
||||||
|
@ -189,6 +189,23 @@ SELECT now() AS current_date_time, current_date_time + INTERVAL '4' day + INTERV
|
|||||||
└─────────────────────┴────────────────────────────────────────────────────────────┘
|
└─────────────────────┴────────────────────────────────────────────────────────────┘
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Вы можете задать период без использования синтаксиса `INTERVAL`, умножив секунды, минуты и часы. Например, период в один день можно записать как `60*60*24`.
|
||||||
|
|
||||||
|
!!! note "Примечание"
|
||||||
|
Синтаксис `now() + 60*60*24` не учитывает региональные настройки времени. Например, переход на летнее время. Для работы с интервалами синтаксис `INTERVAL` или функция `addDays` предпочтительней.
|
||||||
|
|
||||||
|
Пример:
|
||||||
|
|
||||||
|
``` sql
|
||||||
|
SELECT now() AS current_date_time, current_date_time + 60*60*96;
|
||||||
|
```
|
||||||
|
|
||||||
|
``` text
|
||||||
|
┌───current_date_time─┬─plus(now(), multiply(multiply(60, 60), 96))─┐
|
||||||
|
│ 2021-06-12 17:34:49 │ 2021-06-16 17:34:49 │
|
||||||
|
└─────────────────────┴─────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
**Смотрите также**
|
**Смотрите также**
|
||||||
|
|
||||||
- Тип данных [Interval](../../sql-reference/operators/index.md)
|
- Тип данных [Interval](../../sql-reference/operators/index.md)
|
||||||
|
Loading…
Reference in New Issue
Block a user