timestamp

Started by Marc Cuypersalmost 23 years ago5 messagesgeneral
Jump to latest
#1Marc Cuypers
mail@mgvd.be

Hi,

How do insert a timestamp in a timestamp field.

insert into table (tt) values (now()+100)

doesn't seem to work

#2Vincent Hikida
vhikida@inreach.com
In reply to: Marc Cuypers (#1)
Re: timestamp

Try

INSERT INTO tt VALUES (now()+100);

Vincent Hikida,
Member of Technical Staff - Urbana Software, Inc.
"A Personalized Learning Experience"

www.UrbanaSoft.com

----- Original Message -----
From: "Marc Cuypers" <mail@mgvd.be>
To: <pgsql-general@postgresql.org>
Sent: Wednesday, June 04, 2003 5:43 AM
Subject: [GENERAL] timestamp

Show quoted text

Hi,

How do insert a timestamp in a timestamp field.

insert into table (tt) values (now()+100)

doesn't seem to work

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#3Bruno Wolff III
bruno@wolff.to
In reply to: Marc Cuypers (#1)
Re: timestamp

On Wed, Jun 04, 2003 at 14:43:31 +0200,
Marc Cuypers <mail@mgvd.be> wrote:

Hi,

How do insert a timestamp in a timestamp field.

insert into table (tt) values (now()+100)

doesn't seem to work

You probably want something like now() + '100 seconds' .

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Marc Cuypers (#1)
Re: timestamp

Marc Cuypers writes:

How do insert a timestamp in a timestamp field.
insert into table (tt) values (now()+100)
doesn't seem to work

What is now()+100 supposed to mean? Maybe you mean now() + interval '100
seconds' or some other unit.

--
Peter Eisentraut peter_e@gmx.net

#5scott.marlowe
scott.marlowe@ihs.com
In reply to: Marc Cuypers (#1)
Re: timestamp

On Wed, 4 Jun 2003, Marc Cuypers wrote:

Hi,

How do insert a timestamp in a timestamp field.

insert into table (tt) values (now()+100)

doesn't seem to work

Here's a page that might help:

http://www.postgresql.org/docs/view.php?version=7.3&amp;idoc=0&amp;file=functions-datetime.html

A quick hint,

select now() + interval '1 hour';
select now() + interval '45 seconds';