Greg Rahn created IMPALA-5316:
---------------------------------

             Summary: add last_day() function
                 Key: IMPALA-5316
                 URL: https://issues.apache.org/jira/browse/IMPALA-5316
             Project: IMPALA
          Issue Type: New Feature
          Components: Backend, Frontend
            Reporter: Greg Rahn


LAST_DAY(<date>)
Returns the last day of the month in the specified date.
<date> can be DATE or TIMESTAMP

{noformat}
=> select last_day('2017-05-03');
  LAST_DAY
------------
 2017-05-31

=> select now(), last_day(now());
         NOW         |  LAST_DAY
---------------------+------------
 2017-05-01 17:29:03 | 2017-05-31
(1 row)
{noformat}

Reference: 
https://my.vertica.com/docs/8.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Functions/Date-Time/LAST_DAY.htm



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to