This is an automated email from the ASF dual-hosted git repository.

cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 68309a603 Add LAST_DAY to Date/TIme Functions
68309a603 is described below

commit 68309a603f7495a3babb68a3cfd4353b25d9b082
Author: Charles S. Givre <cgi...@apache.org>
AuthorDate: Sat Oct 29 20:54:10 2022 -0400

    Add LAST_DAY to Date/TIme Functions
---
 .../sql-functions/030-date-time-functions-and-arithmetic.md | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
 
b/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
index e388e0ae0..728bd2378 100644
--- 
a/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
+++ 
b/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
@@ -22,6 +22,7 @@ This section covers the Drill [time zone 
limitation]({{site.baseurl}}/docs/data-
 | [DAY]({{site.baseurl}}/docs/date-time-functions-and-arithmetic/#day)         
                                  | BIGINT                        |
 | [HOUR]({{site.baseurl}}/docs/date-time-functions-and-arithmetic/#hour)       
                                  | BIGINT                        |
 | [ISDATE]({{site.baseurl}}/docs/date-time-functions-and-arithmetic/#isdate)   
                                  | BOOLEAN                        |
+| 
[LAST_DAY]({{site.baseurl}}/docs/date-time-functions-and-arithmetic/#last_day)  
                               | DATE                         |
 | [LOCALTIME]({{ site.baseurl 
}}/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions)      
   | TIME                           |
 | [LOCALTIMESTAMP]({{ site.baseurl 
}}/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions)    | 
TIMESTAMP                      |
 | [MINUTE]({{site.baseurl}}/docs/date-time-functions-and-arithmetic/#minute)   
                                  | BIGINT                         |
@@ -654,6 +655,16 @@ What is the seconds component of this timestamp: 
2001-02-16 20:38:40
     |------------|
     1 row selected (0.062 seconds)
 
+## LAST_DAY
+Returns the last day of the month of the supplied date/time.  
+
+       SELECT LAST_DAY('2022-04-03');
+       +------------+
+       |   EXPR$0   |
+       +------------+
+       | 2022-04-30 |
+       +------------+
+
 
 ## Date, Time, and Interval Arithmetic Functions
 
@@ -973,4 +984,4 @@ Returns the year portion of a date or timestamp.  Input can 
be either a string o
     |  y1  |  y2  |
     +------+------+
     | 2022 | 1978 |
-    +------+------+
\ No newline at end of file
+    +------+------+

Reply via email to