Re: [SQL] merging date and time
От | Oliver Smith |
---|---|
Тема | Re: [SQL] merging date and time |
Дата | |
Msg-id | 19990331171611.B12083@kfs.org обсуждение исходный текст |
Ответ на | Re: [SQL] merging date and time ("Ross J. Reedstrom" <reedstrm@rice.edu>) |
Ответы |
Retrieving the record not matched with a join.
|
Список | pgsql-sql |
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...
В списке pgsql-sql по дате отправления: