@@ -139,6 +139,63 @@ is used for relative date filtering:
139139include-tagged::{sql-specs}/docs/docs.csv-spec[filterToday]
140140--------------------------------------------------
141141
142+ [[sql-functions-current-time]]
143+ ==== `CURRENT_TIME/CURTIME`
144+
145+ .Synopsis:
146+ [source, sql]
147+ --------------------------------------------------
148+ CURRENT_TIME
149+ CURRENT_TIME([precision <1>])
150+ CURTIME
151+ --------------------------------------------------
152+
153+ *Input*:
154+
155+ <1> fractional digits; optional
156+
157+ *Output*: time
158+
159+ .Description:
160+
161+ Returns the time when the current query reached the server.
162+ As a function, `CURRENT_TIME()` accepts _precision_ as an optional
163+ parameter for rounding the second fractional digits (nanoseconds). The default _precision_ is 3,
164+ meaning a milliseconds precision current time will be returned.
165+
166+ This method always returns the same value for its every occurrence within the same query.
167+
168+ ["source","sql",subs="attributes,callouts,macros"]
169+ --------------------------------------------------
170+ include-tagged::{sql-specs}/docs/docs.csv-spec[currentTime]
171+ --------------------------------------------------
172+
173+ ["source","sql",subs="attributes,callouts,macros"]
174+ --------------------------------------------------
175+ include-tagged::{sql-specs}/docs/docs.csv-spec[currentTimeFunction]
176+ --------------------------------------------------
177+
178+ ["source","sql",subs="attributes,callouts,macros"]
179+ --------------------------------------------------
180+ include-tagged::{sql-specs}/docs/docs.csv-spec[curTimeFunction]
181+ --------------------------------------------------
182+
183+ ["source","sql",subs="attributes,callouts,macros"]
184+ --------------------------------------------------
185+ include-tagged::{sql-specs}/docs/docs.csv-spec[currentTimeFunctionPrecision]
186+ --------------------------------------------------
187+
188+ Typically, this function is used for relative date/time filtering:
189+
190+ ["source","sql",subs="attributes,callouts,macros"]
191+ --------------------------------------------------
192+ include-tagged::{sql-specs}/docs/docs.csv-spec[filterCurrentTime]
193+ --------------------------------------------------
194+
195+ [IMPORTANT]
196+ Currently, using a _precision_ greater than 3 doesn't make any difference to the output of the
197+ function as the maximum number of second fractional digits returned is 3 (milliseconds).
198+
142199[[sql-functions-current-timestamp]]
143200==== `CURRENT_TIMESTAMP`
144201
0 commit comments