Re: Combine Date and Time Columns to Timestamp

From: Adrian Klaver <adrian(dot)klaver(at)gmail(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:08:14
Message-ID: 50F9E3EE.3010704@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/18/2013 03:31 PM, Rich Shepard wrote:
> My Web searching foo fails me, and I don't see the answer in the
> postgres
> docs so I hope someone here can point me in the proper direction.
>
> There is a table for bacteriological data that contains two columns for
> the date and time the water was collected and another two columns for the
> date and time the plates were read (since the latter should be less than 24
> hours after the former). It would be simpler to combine each date-time pair
> into a single timestamptz column. Seems to me that this can be done with
> SQL within psql, but just how is not obvious to me because I've not worked
> with timestamp values before.
>
> What is the most parsimonious way to combine the two columns into one?

How are they stored, as date and time type, strings, other?
A sample of the data would help also.

>
> TIA,
>
> Rich
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2013-01-19 00:26:12 Re: Combine Date and Time Columns to Timestamp
Previous Message Rich Shepard 2013-01-18 23:31:09 Combine Date and Time Columns to Timestamp