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

From Ron St.Pierre
Subject Re: Create Timestamp From Date and Time
Date
Msg-id 3DE4F1AE.8050008@syscor.com
Whole thread Raw
In response to Create Timestamp From Date and Time  ("Ron St.Pierre" <rstpierre@syscor.com>)
Responses Re: Create Timestamp From Date and Time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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"

I am migrating a DB from Access to postgreSQL and want to convert two
fields from one table into one field (dtmStartDate + dtmStartTime into
startTimestamp). I am running a script after migrating to make many
other changes as well. However, I thought I would try the timestamp
function with the data and time "hard coded" just to see if my use of
the function was correct.


Jean-Christian Imbeault wrote:

> > The 7.2 documentation lists a function:
> >         timestamp(date '1998-02-24',time '23:07')
> > to do just this, however when I try to run it without hard coding
> the date and time fields it fails.
>
> Can you givean example of the statement you use when "not hard coding"?
>
> Jc


--
Ron St.Pierre
Syscor R&D
tel: 250-361-1681
email: rstpierre@syscor.com


pgsql-general by date:

Previous
From: Ken Guest
Date:
Subject: creating index works OK on one db, not on other
Next
From: Loeke
Date:
Subject: template0 1 psql -d .. (newbie)