Skip site navigation (1) Skip section navigation (2)

Re: TimeStamp problem...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Vitali Petrov" <vitalipetrov(at)hotmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: TimeStamp problem...
Date: 2003-01-21 14:59:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
"Vitali Petrov" <vitalipetrov(at)hotmail(dot)com> writes:
> Then I insert new values with timestamp into table I get an error:
> Can anyone tell why?

> Code:
> PreparedStatement newPStat ...
> newPStat.setTimestamp(1, Timestamp.valueOf("2003-01-21 12:25:14"));
> newPStat.executeUpdate();

> Error:
> java.sql.SQLException: ERROR:  pg_atoi: error in "2003-01-21 
> 12:25:14.000000+02": can't parse "-01-21 12:25:14.000000+02"

Since the complaint is coming from pg_atoi, it would seem that this
string is being fed to an integer column, not a timestamp column at
all.  Check your SQL...

			regards, tom lane

In response to

pgsql-jdbc by date

Next:From: J M OkombaDate: 2003-01-21 15:35:10
Subject: Re: Open Office
Previous:From: Oguz ImreDate: 2003-01-21 14:32:08
Subject: getTableName(column+1) returns null ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group