From f62629f6a8c2929d63b3bd2065104d1184696caf Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Mon, 3 Feb 2020 00:20:56 +0300 Subject: [PATCH] Update date_time_functions.md --- .../query_language/functions/date_time_functions.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/en/query_language/functions/date_time_functions.md b/docs/en/query_language/functions/date_time_functions.md index 3b64a671a06..778bd1c1240 100644 --- a/docs/en/query_language/functions/date_time_functions.md +++ b/docs/en/query_language/functions/date_time_functions.md @@ -64,22 +64,19 @@ Leap seconds are not accounted for. ## toUnixTimestamp {#to_unix_timestamp} -Converts a date with time to a Unix timestamp. +For DateTime argument: converts value to it's internal numeric representation (Unix Timestamp). +For String argument: parse datetime from string according to the timezone (optional second argument, server timezone is used by default) and returns the corresponding unix timestamp. **Syntax** ```sql -toUnixTimestamp(datetime[, timezone]) +toUnixTimestamp(datetime) +toUnixTimestamp(str, [timezone]) ``` -**Parameters** - -- `datetime` — Date with time. [String](../../data_types/string.md). -- `timezone` — Optional time zone argument. [String](../../data_types/string.md). - **Returned value** -- Returns the number of seconds between the specified date and the Unix epoch (1970-01-01 00:00:00 UTC). +- Returns the unix timestamp. Type: `UInt32`.