Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5316

add last_day() function

    XMLWordPrintableJSON

Details

    • ghx-label-5

    Description

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

      => 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)
      

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

      Attachments

        Activity

          People

            thundergun Vincent Tran
            grahn Greg Rahn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: