Postgresql timestamps -


currently have 1 column of timestamps showing now: tuesday, august 2, 2016 1:00 pm

these time stamps not limited 1 date shows various dates different times. edit these time stamps, whereby if time shown more 10:20pm of day, change time portion 10:20pm

example: tuesday, august 2, 2016 23:21 pm change to tuesday, august 2, 2016 22:20 pm tuesday, august 3, 2016 1:00 pm no change

essentially, more 22:20 day amend 22:20 while earlier remain before.

update table1     set ts = date_trunc('day', ts) + '22:20:00'::interval    ts - date_trunc('day', ts) > '22:20:00'::interval 

Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -