SQL Time Issue - Mailing list pgsql-novice

From
Subject SQL Time Issue
Date
Msg-id 20050831193348.52833.qmail@web33308.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Date Arithmetic in PL/pgSql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SQL Time Issue
List pgsql-novice
hi all,

i want to pull all the events that occurred from
(today - 2 hours) forward (all events during todays
current date and the last 2 hours from yesterday).

i tried to hack together some mailing list information
to this application and came up with this...

WHERE t_inspect.inspect_timestamp::date >
(current_date::timestamp - 720 'sec'::interval)

inspect_timestamp is datatype timestamp.  i probably
shouldn't cast it to date, now that i think about
it...  but i bet that won't make the query run right
all by itself.

i'm here so you can bet it didn't work. ;-)

any help w/b much appreciated.

tia...





____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Sorting Challenge
Next
From: Michael Glaesemann
Date:
Subject: Re: SQL Time Issue