mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Merge pull request #64496 from Blargian/docs_UTCTimestamp
[Docs] add missing `UTCTimestamp` function
This commit is contained in:
commit
b3fb2f7d5e
@ -4115,6 +4115,43 @@ Result:
|
||||
│ 2023-03-16 18:00:00.000 │
|
||||
└─────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## UTCTimestamp
|
||||
|
||||
Returns the current date and time at the moment of query analysis. The function is a constant expression.
|
||||
|
||||
:::note
|
||||
This function gives the same result that `now('UTC')` would. It was added only for MySQL support and [`now`](#now-now) is the preferred usage.
|
||||
:::
|
||||
|
||||
**Syntax**
|
||||
|
||||
```sql
|
||||
UTCTimestamp()
|
||||
```
|
||||
|
||||
Alias: `UTC_timestamp`.
|
||||
|
||||
**Returned value**
|
||||
|
||||
- Returns the current date and time at the moment of query analysis. [DateTime](../data-types/datetime.md).
|
||||
|
||||
**Example**
|
||||
|
||||
Query:
|
||||
|
||||
```sql
|
||||
SELECT UTCTimestamp();
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```response
|
||||
┌──────UTCTimestamp()─┐
|
||||
│ 2024-05-28 08:32:09 │
|
||||
└─────────────────────┘
|
||||
```
|
||||
|
||||
## timeDiff
|
||||
|
||||
Returns the difference between two dates or dates with time values. The difference is calculated in units of seconds. It is same as `dateDiff` and was added only for MySQL support. `dateDiff` is preferred.
|
||||
|
@ -2791,6 +2791,7 @@ urls
|
||||
usearch
|
||||
userspace
|
||||
userver
|
||||
UTCTimestamp
|
||||
utils
|
||||
uuid
|
||||
uuidv
|
||||
|
Loading…
Reference in New Issue
Block a user