Re: Create Timestamp From Date and Time - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Re: Create Timestamp From Date and Time
Date
Msg-id 3DE4F468.9040209@mega-bucks.co.jp
Whole thread Raw
In response to Create Timestamp From Date and Time  ("Ron St.Pierre" <rstpierre@syscor.com>)
List pgsql-general
Ron St.Pierre wrote:
> Example - when I run the following:
>       select timestamp(date '1998-02-24',time '23:07')
> I get the following error:
>       parse error at or near "date"

what you want is:

select to_timestamp('1998-02-24 23:07'::text, 'YYYY-MM-DD HH:MI');
       to_timestamp
------------------------
  1998-02-24 23:07:00+09
(1 row)

Have a look at:

http://www.postgresql.org/idocs/index.php?functions-formatting.html

Jc


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Create Timestamp From Date and Time
Next
From: Neil Conway
Date:
Subject: Re: rename