pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mitch Vincent <mitch@venux.net>
To: Nico D <nico@mclink.it>
To: pgsql-php@postgresql.org
Subject: Re: timestamp
Date: Sun, 3 Dec 2000 17:39:42 -0800
Message-ID: <003901c05d93$13479d50$0200000a@windows> (raw)
References: <6454.001203@mclink.it>

http://www.postgresql.org/devel-corner/docs/postgres/datetime-functions.htm

More specifically :

date_part('epoch',<timestamp>)

You can pass that to PHP's date() function and format the time to your
liking.

-Mitch
----- Original Message -----
From: "Nico D" <nico@mclink.it>
To: <pgsql-php@postgresql.org>
Sent: Sunday, December 03, 2000 1:53 AM
Subject: [PHP] timestamp


> Is there any function that converts the internal PG timestamp format into
unix
> timestamp format?
>
> Or viceversa, is there a PHP function that formats properly
> the PG timestamp according to the setlocale setting?
>
> I'm trying to get the CPU-wasteless time conversion.
> (I'm using PG 7.0.2)
>
> Thanks
> Nico
>
>
>




view thread (3+ messages)  latest in thread

Message-ID: <003901c05d93$13479d50$0200000a@windows>
Permalink:  ../003901c05d93$13479d50$0200000a@windows/
Also on:    postgresql.org/message-id/003901c05d93$13479d50$0200000a@windows

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: mitch@venux.net, nico@mclink.it
  Subject: Re: timestamp
  In-Reply-To: <003901c05d93$13479d50$0200000a@windows>
  References: <6454.001203@mclink.it> <003901c05d93$13479d50$0200000a@windows>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox