ektravel commented on code in PR #16900: URL: https://github.com/apache/druid/pull/16900#discussion_r1723955666
########## docs/querying/sql-functions.md: ########## @@ -807,28 +807,85 @@ Returns the cumulative distribution of the current row within the window calcula ## CURRENT_DATE -`CURRENT_DATE` +Returns the current date in the connection's time zone. -**Function type:** [Scalar, date and time](sql-scalar.md#date-and-time-functions) +* **Syntax:** `CURRENT_DATE` +* **Function type:** Scalar, date and time -Returns the current date in the connection's time zone. +<details><summary>Example</summary> -## CURRENT_TIMESTAMP +The following example returns the current date. -`CURRENT_TIMESTAMP` +```sql +SELECT CURRENT_DATE AS "current_date" +``` -**Function type:** [Scalar, date and time](sql-scalar.md#date-and-time-functions) +Returns the following: + +| `current_date` | +| -- | +| `2024-08-14T00:00:00.000Z `| + +</details> + +[Learn more](sql-scalar.md#date-and-time-functions) + +## CURRENT_TIMESTAMP Returns the current timestamp in the connection's time zone. -## DATE_TRUNC -`DATE_TRUNC(<CHARACTER>, <TIMESTAMP>)` +* **Syntax:** `CURRENT_TIMESTAMP` +* **Function type:** Scalar, date and time -**Function type:** [Scalar, date and time](sql-scalar.md#date-and-time-functions) +<details><summary>Example</summary> + +The following example returns the current timestamp: Review Comment: ```suggestion The following example returns the current timestamp. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
