Received: from mash.kfs.org (IDENT:root@mash.kfs.org [194.159.240.140]) by hub.org (8.9.2/8.9.1) with ESMTP id LAA06587 for ; Wed, 31 Mar 1999 11:16:13 -0500 (EST) (envelope-from oliver@kfs.org) Received: from oliver by mash.kfs.org with local (Exim 2.05 #1) id 10SNf1-0003Vs-00 for pgsql-sql@postgresql.org; Wed, 31 Mar 1999 17:16:11 +0100 Message-ID: <19990331171611.B12083@kfs.org> Date: Wed, 31 Mar 1999 17:16:11 +0100 From: Oliver Smith To: pgsql-sql@postgresql.org Subject: Re: [SQL] merging date and time Mail-Followup-To: pgsql-sql@postgresql.org References: <370246D0.4F395EE7@rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2 In-Reply-To: <370246D0.4F395EE7@rice.edu>; from Ross J. Reedstrom on Wed, Mar 31, 1999 at 10:01:20AM -0600 On Wed, Mar 31, 1999 at 10:01:20AM -0600, Ross J. Reedstrom wrote: > test=> create table t1 (d date, t text); > CREATE > test=> insert into t1 values('22-03-1999','14:45:27'); > INSERT 101293 1 > test=> select datetime(d+timespan(t)) from t1; > datetime > ---------------------------- > Mon Mar 22 14:45:27 1999 CST > (1 row) > > test=> drop table t1; > DROP > test=> Or more simply... select ('22-03-1999'::date + '14:45:27'::timespan) as myDateTime; mydatetime ---------------------------- Mon Mar 22 14:45:27 1999 GMT (1 row) -- If at first you don't succeed, skydiving is not for you...