Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/reference/sql/functions/date-time.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Functions that target date/time.
--------------------------------------------------
CURRENT_DATE
CURRENT_DATE()
CURDATE()
--------------------------------------------------

*Input*: _none_
Expand All @@ -117,7 +118,12 @@ This method always returns the same value for its every occurrence within the sa

["source","sql",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{sql-specs}/docs/docs.csv-spec[curDate]
include-tagged::{sql-specs}/docs/docs.csv-spec[currentDate]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{sql-specs}/docs/docs.csv-spec[currentDateFunction]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
Expand Down
18 changes: 14 additions & 4 deletions x-pack/plugin/sql/qa/src/main/resources/docs/docs.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -2359,18 +2359,28 @@ SELECT WEEK(CAST('1988-01-05T09:22:10Z' AS TIMESTAMP)) AS week, ISOWEEK(CAST('19


currentDate-Ignore
// tag::curDate
SELECT CURRENT_TIMESTAMP AS result;
// tag::currentDate
SELECT CURRENT_DATE AS result;

result
------------------------
2018-12-12
// end::curDate
// end::currentDate
;

currentDateFunction-Ignore
// tag::currentDateFunction
SELECT CURRENT_DATE() AS result;

result
------------------------
2018-12-12
// end::currentDateFunction
;

curDateFunction-Ignore
// tag::curDateFunction
SELECT CURRENT_TIMESTAMP() AS result;
SELECT CURRENT_DATE() AS result;

result
------------------------
Expand Down