Re: [ADMIN] Function to offset current timestamp

2007-06-01 Thread Dan Harris
Steve Crawford wrote: Dan Harris wrote: I'm trying to write a function that can do a select on an integer value from a table and subtract that value from current_timestamp. Let's say I have a table called users and a field called tz_offset.. I want my function to do something like : select cu

Re: [ADMIN] Function to offset current timestamp

2007-06-01 Thread Steve Crawford
Dan Harris wrote: > I'm trying to write a function that can do a select on an integer value > from a table and subtract that value from current_timestamp. > > Let's say I have a table called users and a field called tz_offset.. > > I want my function to do something like : > > select current_tim

Re: [ADMIN] Function to offset current timestamp

2007-06-01 Thread Dan Harris
Dan Harris wrote: I'm trying to write a function that can do a select on an integer value from a table and subtract that value from current_timestamp. Let's say I have a table called users and a field called tz_offset.. I want my function to do something like : select current_timestamp - '( s

[ADMIN] Function to offset current timestamp

2007-06-01 Thread Dan Harris
I'm trying to write a function that can do a select on an integer value from a table and subtract that value from current_timestamp. Let's say I have a table called users and a field called tz_offset.. I want my function to do something like : select current_timestamp - '( select tz_offset fro