February 3, 201016 yr Hi All, I am working on a query which specifies a 'BETWEEN' clause for a column that has timestamp values; SELECT * FROM Persons WHERE scrapetime BETWEEN 14:30 AND 15:00 'scrapetime' is timestamp format, I'm not sure how to specify the the time only... Any help is greatly appreciated. Saeed
February 5, 201016 yr Author SELECT * FROM Persons WHERE TIME(scrapetime) BETWEEN 14:30:00 AND 15:00:00 Hi Lev, Thanks for your reply, I found a different solution; AND EXTRACT(HOUR FROM scrapetimestamp) = 14 AND EXTRACT(MINUTE FROM scrapetimestamp) >= 30 AND EXTRACT(MINUTE FROM scrapetimestamp) <= 59 Saeed. ps I'm using PostGreSQL.
Create an account or sign in to comment