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

unixtime -> datetime

From: Thilo Mezger <mezger(at)innominate(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: unixtime -> datetime
Date: 1999-11-30 08:07:35
Message-ID: 8200k7$1ff$ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

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:

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

any ideas?


                                                        innominate AG
                                                    networking people
fon: +49.30.308806-11 fax: -77 web: pgp: /pgp/tm

pgsql-sql by date

Next:From: Patrick JACQUOTDate: 1999-11-30 12:07:26
Subject: found a way to update a table with data from another one
Previous:From: Bruce MomjianDate: 1999-11-30 03:13:59
Subject: Re: [SQL] NULL

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