How to get the last day of month in postgres?

前端 未结 5 1441
醉话见心
醉话见心 2020-12-18 17:47

How to find the last day os the month in postgres? I have a date columns stored as numeric(18) in the format(YYYYMMDD) I am trying it to make it date using

         


        
5条回答
  •  粉色の甜心
    2020-12-18 18:49

    Simply by using the last_day function:

    select last_day(to_date(act_date,'YYYYMMDD'))
    

    PS: Now, i believe that you know that it is very important to choose the right tags for your own question!

提交回复
热议问题