Fix the English version

Поправил английскую версию согласно комментариям в PR.
This commit is contained in:
Dmitriy 2021-02-15 23:47:12 +03:00
parent f6cbad65e8
commit c9a6b21fc8

View File

@ -691,12 +691,12 @@ Same as for [parseDateTimeBestEffort](#parsedatetimebesteffort) except that it r
## parseDateTimeBestEffortUSOrNull {#parsedatetimebesteffortusornull}
Same as for [parseDateTimeBestEffortUS](#parsedatetimebesteffortUS) except that it returns `NULL` when it encounters a date format that cannot be processed.
Same as [parseDateTimeBestEffortUS](#parsedatetimebesteffortUS) function except that it returns `NULL` when it encounters a date format that cannot be processed.
**Syntax**
``` sql
parseDateTimeBestEffortUSOrNull(time_string [, time_zone]);
parseDateTimeBestEffortUSOrNull(time_string[, time_zone])
```
**Parameters**
@ -716,16 +716,15 @@ parseDateTimeBestEffortUSOrNull(time_string [, time_zone]);
Possible values:
- `time_string` converted to the [DateTime](../../sql-reference/data-types/datetime.md) data type.
- `NULL` if the input string cannot be converted to the `DateTime` data type.
- `time_string` converted to the [DateTime](../../sql-reference/data-types/datetime.md) data type.
- `NULL` if the input string cannot be converted to the `DateTime` data type.
**Examples**
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrNull('02/10/2021 21:12:57')
AS parseDateTimeBestEffortUSOrNull;
SELECT parseDateTimeBestEffortUSOrNull('02/10/2021 21:12:57') AS parseDateTimeBestEffortUSOrNull;
```
Result:
@ -739,8 +738,7 @@ Result:
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrNull('02-10-2021 21:12:57')
AS parseDateTimeBestEffortUSOrNull;
SELECT parseDateTimeBestEffortUSOrNull('02-10-2021 21:12:57') AS parseDateTimeBestEffortUSOrNull;
```
Result:
@ -754,8 +752,7 @@ Result:
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrNull('02.10.2021 21:12:57')
AS parseDateTimeBestEffortUSOrNull;
SELECT parseDateTimeBestEffortUSOrNull('02.10.2021 21:12:57') AS parseDateTimeBestEffortUSOrNull;
```
Result:
@ -769,8 +766,7 @@ Result:
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrNull('02.2021 21:12:57')
AS parseDateTimeBestEffortUSOrNull;
SELECT parseDateTimeBestEffortUSOrNull('02.10.2021') AS parseDateTimeBestEffortUSOrNull;
```
Result:
@ -783,30 +779,32 @@ Result:
## parseDateTimeBestEffortUSOrZero {#parsedatetimebesteffortusorzero}
Same as for [parseDateTimeBestEffortUS](#parsedatetimebesteffortUS) except that it returns zero date or zero date time when it encounters a date format that cannot be processed.
Same as [parseDateTimeBestEffortUS](#parsedatetimebesteffortUS) function except that it returns zero date or zero date with time when it encounters a date format that cannot be processed.
**Syntax**
``` sql
parseDateTimeBestEffortUSOrZero(time_string [, time_zone]);
parseDateTimeBestEffortUSOrZero(time_string[, time_zone])
```
**Parameters**
- `time_string` — String containing a date and time to convert. [String](../../sql-reference/data-types/string.md).
- `time_zone`Time zone. The function parses `time_string` according to the time zone. [String](../../sql-reference/data-types/string.md).
- `time_string` — String containing a date or date with time to convert. The date must be in the US date format (`MM/DD/YYYY`). [String](../../sql-reference/data-types/string.md).
- `time_zone`[Timezone](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-timezone). The function parses `time_string` according to the timezone. Optional. [String](../../sql-reference/data-types/string.md).
**Supported non-standard formats**
- A string containing 9..10 digit [unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
- A string with a date and a time component: `YYYYMMDDhhmmss`, `MM/DD/YYYY hh:mm:ss`, `MM-DD-YY hh:mm`, `YYYY-MM-DD hh:mm:ss`, etc.
- A string with a date and a time components: `YYYYMMDDhhmmss`, `MM/DD/YYYY hh:mm:ss`, `MM-DD-YY hh:mm`, `YYYY-MM-DD hh:mm:ss`, etc.
- A string with a date, but no time component: `YYYY`, `YYYYMM`, `YYYY*MM`, `MM/DD/YYYY`, `MM-DD-YY` etc.
- A string with a day and time: `DD`, `DD hh`, `DD hh:mm`. In this case, `YYYY-MM` are substituted as `2000-01`.
- A string that includes the date and time along with time zone offset information: `YYYY-MM-DD hh:mm:ss ±h:mm`, etc. For example, `2020-12-12 17:36:00 -5:00`.
- A string with a day and time: `DD`, `DD hh`, `DD hh:mm`. In this case, `YYYY-MM` are substituted with `2000-01`.
- A string that includes date and time along with timezone offset information: `YYYY-MM-DD hh:mm:ss ±h:mm`, etc. For example, `2020-12-12 17:36:00 -5:00`.
**Returned value**
**Returned values**
- `time_string` converted to the `DateTime` data type.
Possible values:
- `time_string` converted to the [DateTime](../../sql-reference/data-types/datetime.md) data type.
- `zero date time`.
**Examples**
@ -814,8 +812,7 @@ parseDateTimeBestEffortUSOrZero(time_string [, time_zone]);
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrZero('02/10/2021 21:12:57')
AS parseDateTimeBestEffortUSOrZero;
SELECT parseDateTimeBestEffortUSOrZero('02/10/2021 21:12:57') AS parseDateTimeBestEffortUSOrZero;
```
Result:
@ -829,8 +826,7 @@ Result:
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrZero('02-10-2021 21:12:57')
AS parseDateTimeBestEffortUSOrZero;
SELECT parseDateTimeBestEffortUSOrZero('02-10-2021 21:12:57') AS parseDateTimeBestEffortUSOrZero;
```
Result:
@ -844,8 +840,7 @@ Result:
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrZero('02.10.2021 21:12:57')
AS parseDateTimeBestEffortUS;
SELECT parseDateTimeBestEffortUSOrZero('02.10.2021 21:12:57') AS parseDateTimeBestEffortUS;
```
Result:
@ -859,8 +854,7 @@ Result:
Query:
``` sql
SELECT parseDateTimeBestEffortUSOrZero('02.2021 21:12:57')
AS parseDateTimeBestEffortUSOrZero;
SELECT parseDateTimeBestEffortUSOrZero('02.2021 21:12:57') AS parseDateTimeBestEffortUSOrZero;
```
Result: