0
I have in a cell that contains only the date, in case 2018-07-11
, I need to make a select
that will bring this cell so: 2018-07-11 23:59:59
, it is possible to do this?
0
I have in a cell that contains only the date, in case 2018-07-11
, I need to make a select
that will bring this cell so: 2018-07-11 23:59:59
, it is possible to do this?
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 it working on SQL Fiddle.
Browser other questions tagged sql postgresql
You are not signed in. Login or sign up in order to post.
In case you want the select to bring the date and time, but in the cell there is only the date? would that be?
– Willian Lima
What is your purpose ? Compare dates ? Have you ever thought about doing a CAST for
DATE
at the time of comparison ?– Lacobus