How to set the time of a timestamp to 23:59:59 in postgresql?

0

I have a cell that contains only the date, in the case 2018-07-11 , I need to make a select that will bring that cell like this: 2018-07-11 23:59:59 , is it possible to do that?

    
asked by anonymous 11.07.2018 / 22:32

1 answer

1

Operations with dates in postgreSQL are easy to implement, as we see in documentation

In your case just do:

SELECT data, data + time '23:59:59'
FROM datas

You can see this working in SQL Fiddle .

    
11.07.2018 / 22:43