Re: date_trun() with timezones? (was Re: [GENERAL] TIME column manipulation/comparison hangups)

2008-11-03 Thread Tom Lane
Bill Moran <[EMAIL PROTECTED]> writes: > Not quite. As shown in the examples, date_trunc() works fine on > TIME WITHOUT TIME ZONE, but there's no such function for TIME WITH > TIME ZONE. Well, actually there's no date_trunc for time either: regression=# \df date_trunc

date_trun() with timezones? (was Re: [GENERAL] TIME column manipulation/comparison hangups)

2008-11-03 Thread Bill Moran
In response to "Scott Marlowe" <[EMAIL PROTECTED]>: > On Mon, Nov 3, 2008 at 12:25 PM, Bill Moran > <[EMAIL PROTECTED]> wrote: > > In response to "Scott Marlowe" <[EMAIL PROTECTED]>: > > > >> On Mon, Nov 3, 2008 at 12:01 PM, Bill Moran > >> <[EMAIL PROTECTED]> wrote: > >> > > >> > I'm trying to te

Re: [GENERAL] TIME column manipulation/comparison hangups

2008-11-03 Thread Scott Marlowe
On Mon, Nov 3, 2008 at 12:31 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Mon, Nov 3, 2008 at 12:25 PM, Bill Moran > <[EMAIL PROTECTED]> wrote: >> In response to "Scott Marlowe" <[EMAIL PROTECTED]>: >> >>> On Mon, Nov 3, 2008 at 12:01 PM, Bill Moran >>> <[EMAIL PROTECTED]> wrote: >>> > >>> > I

Re: [GENERAL] TIME column manipulation/comparison hangups

2008-11-03 Thread Scott Marlowe
On Mon, Nov 3, 2008 at 12:25 PM, Bill Moran <[EMAIL PROTECTED]> wrote: > In response to "Scott Marlowe" <[EMAIL PROTECTED]>: > >> On Mon, Nov 3, 2008 at 12:01 PM, Bill Moran >> <[EMAIL PROTECTED]> wrote: >> > >> > I'm trying to test the time in a time column to see if it's the same >> > minute as t

Re: [GENERAL] TIME column manipulation/comparison hangups

2008-11-03 Thread Bill Moran
In response to "Scott Marlowe" <[EMAIL PROTECTED]>: > On Mon, Nov 3, 2008 at 12:01 PM, Bill Moran > <[EMAIL PROTECTED]> wrote: > > > > I'm trying to test the time in a time column to see if it's the same > > minute as the current time. I wouldn't have thought this would be > > difficult: > > > >

Re: [GENERAL] TIME column manipulation/comparison hangups

2008-11-03 Thread Scott Marlowe
On Mon, Nov 3, 2008 at 12:01 PM, Bill Moran <[EMAIL PROTECTED]> wrote: > > I'm trying to test the time in a time column to see if it's the same > minute as the current time. I wouldn't have thought this would be > difficult: > > WHERE TO_CHAR(now(), 'HH24MI') = TO_CHAR(time_column, 'HH24MI') Use

Re: [GENERAL] TIME column manipulation/comparison hangups

2008-11-03 Thread Raymond O'Donnell
On 03/11/2008 19:01, Bill Moran wrote: > It seems as if EXTRACT() will work, but it sure feels hacky > to do: > > (extract(hours from now()) = extract(hours from time_column) > AND > (extract(minutes from now()) = extract(minutes from time_column) I'd have thought that this was the correct way

[GENERAL] TIME column manipulation/comparison hangups

2008-11-03 Thread Bill Moran
I'm trying to test the time in a time column to see if it's the same minute as the current time. I wouldn't have thought this would be difficult: WHERE TO_CHAR(now(), 'HH24MI') = TO_CHAR(time_column, 'HH24MI') Doesn't work, though: ERROR: function to_char(time with time zone, unknown) does not