Re: Combine Date and Time Columns to Timestamp

From: Steven Schlansker <steven(at)likeness(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Combine Date and Time Columns to Timestamp
Date: 2013-01-19 00:40:38
Message-ID: 94744B32-F6B9-4D69-BFFE-0B49F58F1075@likeness.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jan 18, 2013, at 4:26 PM, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:

> On Fri, 18 Jan 2013, Adrian Klaver wrote:
>
>> How are they stored, as date and time type, strings, other?
>
> Adrian,
>
> ISO date and time.
>
>> A sample of the data would help also.
>
> Example: 2012-10-29 | 10:19 | 2012-10-30 | 09:40

steven=# create temporary table date_test (d varchar, t varchar);
CREATE TABLE
steven=# insert into date_test values('2010-08-23', '8:04:33');
INSERT 0 1
steven=# select d::date + t::interval from date_test;
?column?
---------------------
2010-08-23 08:04:33
(1 row)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2013-01-19 00:43:24 Re: SELECT * and column ordering
Previous Message Adrian Klaver 2013-01-19 00:33:49 Re: Combine Date and Time Columns to Timestamp