Skip to content

Commit e943e42

Browse files
💬Generate LLM translations (#1043)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3c3763e commit e943e42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+457
-451
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"label": "Date & Time Functions"
2+
"label": "日期与时间函数"
33
}

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/addinterval.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
title: ADD TIME INTERVAL
3-
description: Add time interval function
2+
title: 添加时间间隔
3+
description: 添加时间间隔函数
44
title_includes: add_years, add_quarters, add_months, add_days, add_hours, add_minutes, add_seconds
55
---
66

7-
Add a time interval to a date or timestamp, return the result of date or timestamp type.
7+
向日期或时间戳添加时间间隔,返回日期或时间戳类型的结果。
88

9-
## Syntax
9+
## 语法
1010

1111
```sql
1212
ADD_YEARS(<exp0>, <expr1>)
13-
ADD_QUARTERs(<exp0>, <expr1>)
13+
ADD_QUARTERS(<exp0>, <expr1>)
1414
ADD_MONTHS(<exp0>, <expr1>)
1515
ADD_DAYS(<exp0>, <expr1>)
1616
ADD_HOURS(<exp0>, <expr1>)
1717
ADD_MINUTES(<exp0>, <expr1>)
1818
ADD_SECONDS(<exp0>, <expr1>)
1919
```
2020

21-
## Return Type
21+
## 返回类型
2222

23-
`DATE`, `TIMESTAMP`, depends on the input.
23+
`DATE`, `TIMESTAMP`,取决于输入。
2424

25-
## Examples
25+
## 示例
2626

2727
```sql
2828
SELECT to_date(18875), add_years(to_date(18875), 2);
@@ -80,4 +80,4 @@ SELECT to_datetime(1630833797), add_seconds(to_datetime(1630833797), 2);
8080
├─────────────────────────┼─────────────────────────────────────────┤
8181
2021-09-05 09:23:172021-09-05 09:23:19
8282
└───────────────────────────────────────────────────────────────────┘
83-
```
83+
```

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/current-timestamp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: CURRENT_TIMESTAMP
33
---
44

5-
Alias for [NOW](now.md).
5+
[NOW](now.md) 的别名。

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date-add.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
title: DATE_ADD
33
---
44

5-
Add the time interval or date interval to the provided date or date with time (timestamp/datetime).
5+
将时间间隔或日期间隔添加到提供的日期或带时间的日期(时间戳/日期时间)。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
DATE_ADD(<unit>, <value>, <date_or_time_expr>)
1111
```
12-
## Arguments
12+
## 参数
1313

14-
| Arguments | Description |
14+
| 参数 | 描述 |
1515
|-----------------------|-------------------------------------------------------------------------------------------------------------------|
16-
| `<unit>` | Must be of the following values: `YEAR`, `QUARTER`, `MONTH`, `DAY`, `HOUR`, `MINUTE` and `SECOND` |
17-
| `<value>` | This is the number of units of time that you want to add. For example, if you want to add 2 days, this will be 2. |
18-
| `<date_or_time_expr>` | A value of `DATE` or `TIMESTAMP` type |
16+
| `<unit>` | 必须是以下值之一:`YEAR``QUARTER``MONTH``DAY``HOUR``MINUTE` `SECOND` |
17+
| `<value>` | 这是您要添加的时间单位数量。例如,如果您想添加2天,则此值为2。 |
18+
| `<date_or_time_expr>` | 一个 `DATE` `TIMESTAMP` 类型的值 |
1919

20-
## Return Type
20+
## 返回类型
2121

22-
The function returns a value of the same type as the `<date_or_time_expr>` argument.
22+
函数返回与 `<date_or_time_expr>` 参数相同类型的值。
2323

24-
## Examples
24+
## 示例
2525

26-
Query:
26+
查询:
2727
```sql
2828
SELECT date_add(YEAR, 1, to_date('2018-01-02'));
2929

@@ -33,4 +33,4 @@ SELECT date_add(YEAR, 1, to_date('2018-01-02'));
3333
├──────────────────────────────────────────┤
3434
2019-01-02
3535
└──────────────────────────────────────────┘
36-
```
36+
```

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date-diff.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: DATE DIFF
33
---
44

5-
Databend does not provide a `date_diff` function yet, but it supports direct arithmetic operations on dates and times. For example, you can use the expression `TO_DATE(NOW())-2` to obtain the date from two days ago.
5+
Databend 目前尚未提供 `date_diff` 函数,但它支持直接对日期和时间进行算术运算。例如,你可以使用表达式 `TO_DATE(NOW())-2` 来获取两天前的日期。
66

7-
This flexibility of directly manipulating dates and times in Databend makes it convenient and versatile for handling date and time computations. See an example below:
7+
Databend 直接操作日期和时间的灵活性使其在处理日期和时间计算时既方便又多功能。请参见以下示例:
88

99
```sql
1010
CREATE TABLE tasks (
@@ -29,4 +29,4 @@ FROM tasks;
2929
│ Task 27
3030
│ Task 33
3131
└────────────────────────────────────┘
32-
```
32+
```

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date-format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: DATE_FORMAT
33
---
44

5-
Alias for [TO_STRING](../02-conversion-functions/to-string.md).
5+
[TO_STRING](../02-conversion-functions/to-string.md) 的别名。

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date-part.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ title: DATE_PART
44

55
import FunctionDescription from '@site/src/components/FunctionDescription';
66

7-
<FunctionDescription description="Introduced or updated: v1.2.153"/>
7+
<FunctionDescription description="引入或更新:v1.2.153"/>
88

9-
Retrieves the designated portion of a date, time, or timestamp.
9+
提取日期、时间或时间戳的指定部分。
1010

11-
See also: [EXTRACT](extract.md)
11+
另请参阅:[EXTRACT](extract.md)
1212

13-
## Syntax
13+
## 语法
1414

1515
```sql
1616
DATE_PART( YEAR | QUARTER | MONTH | WEEK | DAY | HOUR | MINUTE | SECOND | DOW | DOY, <date_or_time_expr> )
1717
```
1818

19-
- DOW: Day of Week.
20-
- DOY: Day of Year.
19+
- DOW:星期几。
20+
- DOY:一年中的第几天。
2121

22-
## Return Type
22+
## 返回类型
2323

24-
Integer.
24+
整数。
2525

26-
## Examples
26+
## 示例
2727

2828
```sql
2929
SELECT NOW();

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date-sub.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
title: DATE_SUB
33
---
44

5-
Subtract the time interval or date interval from the provided date or date with time (timestamp/datetime).
5+
从提供的日期或日期时间(时间戳/日期时间)中减去时间间隔或日期间隔。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
DATE_SUB(<unit>, <value>, <date_or_time_expr>)
1111
```
12-
## Arguments
12+
## 参数
1313

14-
| Arguments | Description |
14+
| 参数 | 描述 |
1515
|-----------------------|-------------------------------------------------------------------------------------------------------------------|
16-
| `<unit>` | Must be of the following values: `YEAR`, `QUARTER`, `MONTH`, `DAY`, `HOUR`, `MINUTE` and `SECOND` |
17-
| `<value>` | This is the number of units of time that you want to add. For example, if you want to add 2 days, this will be 2. |
18-
| `<date_or_time_expr>` | A value of `DATE` or `TIMESTAMP` type |
16+
| `<unit>` | 必须是以下值之一:`YEAR`, `QUARTER`, `MONTH`, `DAY`, `HOUR`, `MINUTE` `SECOND` |
17+
| `<value>` | 这是您想要减去的时间单位数量。例如,如果您想减去2天,这就是2。 |
18+
| `<date_or_time_expr>` | 一个 `DATE` `TIMESTAMP` 类型的值 |
1919

20-
## Return Type
20+
## 返回类型
2121

22-
The function returns a value of the same type as the `<date_or_time_expr>` argument.
22+
函数返回与 `<date_or_time_expr>` 参数相同类型的值。
2323

24-
## Examples
24+
## 示例
2525

2626
```sql
2727
SELECT date_sub(YEAR, 1, to_date('2018-01-02'));
@@ -31,4 +31,4 @@ SELECT date_sub(YEAR, 1, to_date('2018-01-02'));
3131
├──────────────────────────────────────────┤
3232
2017-01-02
3333
└──────────────────────────────────────────┘
34-
```
34+
```

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date-trunc.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
title: DATE_TRUNC
33
---
44

5-
Truncates a date, time, or timestamp value to a specified precision. For example, if you truncate `2022-07-07` to `MONTH`, the result will be `2022-07-01`; if you truncate `2022-07-07 01:01:01.123456` to `SECOND`, the result will be `2022-07-07 01:01:01.000000`.
5+
将日期、时间或时间戳值截断到指定的精度。例如,如果将 `2022-07-07` 截断到 `MONTH`,结果将是 `2022-07-01`;如果将 `2022-07-07 01:01:01.123456` 截断到 `SECOND`,结果将是 `2022-07-07 01:01:01.000000`
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
DATE_TRUNC(<precision>, <date_or_time_expr>)
1111
```
12-
## Arguments
12+
## 参数
1313

14-
| Arguments | Description |
15-
|-----------------------|----------------------------------------------------------------------------------------------------|
16-
| `<precision>` | Must be of the following values: `YEAR`, `QUARTER`, `MONTH`, `DAY`, `HOUR`, `MINUTE` and `SECOND` |
17-
| `<date_or_time_expr>` | A value of `DATE` or `TIMESTAMP` type |
14+
| 参数 | 描述 |
15+
|-----------------------|--------------------------------------------------------------------------------------------------|
16+
| `<precision>` | 必须是以下值之一:`YEAR``QUARTER``MONTH``DAY``HOUR``MINUTE` `SECOND` |
17+
| `<date_or_time_expr>` | `DATE` `TIMESTAMP` 类型的值 |
1818

19-
## Return Type
19+
## 返回类型
2020

21-
The function returns a value of the same type as the `<date_or_time_expr>` argument.
21+
函数返回与 `<date_or_time_expr>` 参数相同类型的值。
2222

23-
## Examples
23+
## 示例
2424

2525
```sql
2626
select date_trunc(month, to_date('2022-07-07'));
@@ -30,4 +30,4 @@ select date_trunc(month, to_date('2022-07-07'));
3030
├──────────────────────────────────────────┤
3131
2022-07-01
3232
└──────────────────────────────────────────┘
33-
```
33+
```

docs/cn/sql-reference/20-sql-functions/05-datetime-functions/date.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ title: DATE
33
---
44
import FunctionDescription from '@site/src/components/FunctionDescription';
55

6-
<FunctionDescription description="Introduced or updated: v1.2.375"/>
6+
<FunctionDescription description="引入或更新:v1.2.375"/>
77

8-
Alias for [TO_DATE](to-date.md).
8+
[TO_DATE](to-date.md) 的别名。

0 commit comments

Comments
 (0)