Re: Inserting a timestamp in a "timestamp" column.

From: Erik Jones <erik(at)myemma(dot)com>
To: rihad <rihad(at)mail(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Inserting a timestamp in a "timestamp" column.
Date: 2007-09-14 20:36:13
Message-ID: EF480893-E468-470A-AEF7-C950897637C9@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I normally use (for php) something like date('Y-m-d H:i:s', time())
to get a string version that Postgres will accept.

On Sep 14, 2007, at 3:23 PM, rihad wrote:

> Hi all,
>
> I have a column declared as "timestamp without time zone" that I
> vainly want to insert a raw timestamp into (i.e. in the format
> returned by Perl's or PHP's time()). I know of SQL NOW(), but I
> want to insert a "cooked" timestamp from the outside most
> efficiently. How?
>
> Thanks.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

Erik Jones

Software Developer | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2007-09-14 20:43:34 Re: Pgsql roles, SQL injection, and utility statements
Previous Message Pavel Stehule 2007-09-14 20:32:36 Re: plpgsql trigger original query