This is an automated email from the ASF dual-hosted git repository.
bridgetb pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/drill-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 52338a2 edits
52338a2 is described below
commit 52338a2e09d75adbb2b5d467a1fdf6b70a7d887d
Author: Bridget Bevens <[email protected]>
AuthorDate: Thu Dec 27 22:57:31 2018 -0800
edits
---
docs/date-time-functions-and-arithmetic/index.html | 34 +++++++++++++++-------
feed.xml | 4 +--
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/docs/date-time-functions-and-arithmetic/index.html
b/docs/date-time-functions-and-arithmetic/index.html
index 75d9978..9d34056 100644
--- a/docs/date-time-functions-and-arithmetic/index.html
+++ b/docs/date-time-functions-and-arithmetic/index.html
@@ -1964,44 +1964,56 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.
<h3 id="timestampdiff-syntax">TIMESTAMPDIFF Syntax</h3>
-<p>TIMESTAMPDIFF(<em>time_unit,datetime_expression1,datetime_expression2</em>)
</p>
+<p>TIMESTAMPDIFF(<em>time_unit, keyword datetime_expression1, keyword
datetime_expression2</em>) </p>
<h3 id="timestampdiff-usage-notes">TIMESTAMPDIFF Usage Notes</h3>
<ul>
-<li>Datetime expressions are date (YYYY-MM-DD) or datetime (YYYY-MM-DD
HH:MM:SS) expressions.</li>
+<li><em>Keyword</em> is the type of <em>date_expression</em>: date, time, or
timestamp</li>
+<li>Supports date, time, and timestamp values in the following formats:
+
+<ul>
+<li>Date format: YYYY-MM-DD</li>
+<li>Time format: HH:MI:SS</li>
+<li>Timestamp format: YYYY-MM-DD HH:MI:SS</li>
+</ul></li>
<li>You can include two date expressions, or one date expression with one
datetime expression, as shown in the examples that follow.</li>
<li>Supports the following time units: Nanosecond, Microsecond, Second,
Minute, Hour, Day, Month, Year, Week, Quarter</li>
<li>Drill uses the unit of time to infer the return type.</li>
<li><p>You can include the SQL_TSI_ prefix with the any of the supported time
units, as shown: </p>
-<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT TIMESTAMPDIFF(SQL_TSI_YEAR,'1982-05-06',
'1986-05-06');
+<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT TIMESTAMPDIFF(SQL_TSI_YEAR, DATE '1982-05-06',
DATE '1986-05-06');
++---------+
+| EXPR$0 |
++---------+
+| 4 |
++---------+
</code></pre></div></li>
</ul>
<h3 id="timestampdiff-examples">TIMESTAMPDIFF Examples</h3>
<p>Subtracts 1982-05-06 from 2018-12-26 and returns the difference in months:
</p>
-<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT
TIMESTAMPDIFF(MONTH,'1982-05-06','2018-12-26');
+<div class="highlight"><pre><code class="language-text" data-lang="text">
SELECT TIMESTAMPDIFF(MONTH, DATE'1982-05-06', DATE
'2018-12-26');
+---------+
| EXPR$0 |
+---------+
| 439 |
-+---------+
++---------+
</code></pre></div>
<p>Subtracts 2003-02-01 12:05:55 from 2018-05-01 and returns the difference in
minutes: </p>
-<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT TIMESTAMPDIFF(MINUTE,'2003-02-01
12:05:55','2018-05-01');
+<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT TIMESTAMPDIFF(MINUTE, TIMESTAMP '2003-02-01
12:05:55', DATE '2018-05-01');
+----------+
| EXPR$0 |
+----------+
-| 8017920 |
-+----------+
+| 8017194 |
++----------+
</code></pre></div>
-<p>Subtracts 2003-02-01 from 2018-05-01 12:05:35 and returns the difference in
microseconds:</p>
-<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT
TIMESTAMPDIFF(MICROSECOND,'2003-02-01','2018-05-01 12:05:35');
+<p>Subtracts 2003-02-01 from 2018-05-01 12:05:35 and returns the difference in
microseconds: </p>
+<div class="highlight"><pre><code class="language-text"
data-lang="text">SELECT TIMESTAMPDIFF(MICROSECOND, DATE '2003-02-01',
TIMESTAMP '2018-05-01 12:05:35');
+------------------+
| EXPR$0 |
+------------------+
-| 481075200000000 |
+| 481118735000000 |
+------------------+
</code></pre></div>
diff --git a/feed.xml b/feed.xml
index 9236f9d..fda26b9 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,8 +6,8 @@
</description>
<link>/</link>
<atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
- <pubDate>Thu, 27 Dec 2018 22:39:15 -0800</pubDate>
- <lastBuildDate>Thu, 27 Dec 2018 22:39:15 -0800</lastBuildDate>
+ <pubDate>Thu, 27 Dec 2018 22:54:57 -0800</pubDate>
+ <lastBuildDate>Thu, 27 Dec 2018 22:54:57 -0800</lastBuildDate>
<generator>Jekyll v2.5.2</generator>
<item>