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

Questions about INSERT INTO!

From: "Anna Langer" <anna_langer(at)hotmail(dot)com>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Questions about INSERT INTO!
Date: 1999-05-25 00:54:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

Thanks for all help. It worked very well.

We still have some problems with inserting a datetime into the database.

If we write like this the database accept it:

PQexec(conn, "INSERT INTO test VALUES('23/01/1999 12:03:30');

When we are inserting other values in the database we write like this:

sprintf(command, "INSERT INTO octets VALUES(%d, %d)", a, b);

Now we wonder if we can put the date in to the database in the same way that 
we did with the integers? We have tried to make the date to a string, but it 
doesn't take it. The errormessage say that the database is of type datetime 
and the string is of type int4.

Is there anyone who can help us with this?


Anna and Maria

Get Your Private, Free Email at


pgsql-interfaces by date

Next:From: Peter HarveyDate: 1999-05-25 03:12:28
Subject: ANNOUNCE: unixODBC Beta 1.0.4
Previous:From: Tom LaneDate: 1999-05-25 00:11:49
Subject: Re: [INTERFACES] dynamic IPs

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