Received: from yuubin.games.no (yuubin.link.no [193.213.36.89]) by hub.org (8.8.8/8.7.5) with ESMTP id NAA00427 for ; Thu, 18 Jun 1998 13:27:23 -0400 (EDT) Received: from sleeper.games.no (pere@sleeper.link.no [193.213.36.74]) by yuubin.games.no (8.8.7/8.8.7) with ESMTP id TAA27964; Thu, 18 Jun 1998 19:26:27 +0200 Received: (from pere@localhost) by sleeper.games.no (8.8.7/8.8.7) id TAA25534; Thu, 18 Jun 1998 19:26:24 +0200 Date: Thu, 18 Jun 1998 19:26:24 +0200 Message-Id: <199806181726.TAA25534@sleeper.games.no> To: pgsql-sql@postgreSQL.org Followup-to: pere@games.no,pgsql-sql@postgreSQL.org Subject: 'now - 4 hours ago' ? From: Petter Reinholdtsen Reply-to: pere@hungry.com I'm still learning SQL. :-) Now I have upgraded my PostgreSQL database to v6.3.2, and have the following table. CREATE TABLE testdate( received timestamp DEFAULT CURRENT_DATE, info text NOT NULL ); I want to select the info received (inserted) more then 4 hours ago. How do I specify that in SQL? Is timestamp the best datatype for this kind of query? Which date-types exists in PostgreSQL, and what is the difference between them. I'll be very happy to get pointers to good intros. :-) I'm not on this list, so please send copies to me. -- ##> Petter Reinholdtsen <## | pere@td.org.uit.no O- http://www.hungry.com/~pere/ | Go Mozilla, go! Go!