Hi, I need to substract a variable hour from a timestamp in PostgreSQL 8.2, I think I can use the following sentence
I try that line in console and works fine for my purposes, but I'm having troubles turning the '-5' into a parameter for a plpgsql function.
Do you have any recommendations about how this can be done?
PS: This is my first post, I hope I accomplish all the posting guidelines, any comment is welcome.
Code:
select '2007-05-14 12:36:47' + ('-5 hours'::reltime);
Do you have any recommendations about how this can be done?
PS: This is my first post, I hope I accomplish all the posting guidelines, any comment is welcome.
Comment