pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thilo Mezger <mezger@innominate.de>
To: pgsql-sql@postgresql.org
Subject: unixtime -> datetime
Date: 30 Nov 1999 08:07:35 GMT
Message-ID: <8200k7$1ff$1@lingo01.bln.innominate.de> (raw)

hi,

i was wondering if there was a built-in function for converting unix
time (seconds since the epoch) to postgresql's datetime type.

i was looking for something like this (but couldn't find it):

    SELECT unixtime(943948651);

and want to get something like this:

    foo
    ----------------------
    1999-11-30 09:06:43+01
    (1 row)

any ideas?

thilo


-- 
mezger@innominate.de
                                                        innominate AG
                                                    networking people
fon: +49.30.308806-11 fax: -77 web: http://innominate.de pgp: /pgp/tm



Message-ID: <8200k7$1ff$1@lingo01.bln.innominate.de>
Permalink:  ../8200k7$1ff$1@lingo01.bln.innominate.de/
Also on:    postgresql.org/message-id/8200k7$1ff$1@lingo01.bln.innominate.de

 · 

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-sql@postgresql.org
  Cc: mezger@innominate.de
  Subject: Re: unixtime -> datetime
  In-Reply-To: <8200k7$1ff$1@lingo01.bln.innominate.de>
  References: <8200k7$1ff$1@lingo01.bln.innominate.de>

* 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