Received: from hermes.mixx.net (root@hermes.mixx.net [194.152.58.71]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA09167 for ; Tue, 30 Nov 1999 03:07:38 -0500 (EST) (envelope-from news@innominate.de) Received: from innominate.de (gatekeeper.innominate.de [212.5.16.129]) by hermes.mixx.net (8.9.3/8.9.3) with SMTP id JAA24276 for ; Tue, 30 Nov 1999 09:07:36 +0100 Received: (qmail 1882 invoked by uid 9); 30 Nov 1999 08:07:35 -0000 To: pgsql-sql@postgresql.org Path: not-for-mail From: Thilo Mezger Newsgroups: list.pgsql.sql Subject: unixtime -> datetime Date: 30 Nov 1999 08:07:35 GMT Organization: innominate AG Lines: 26 Message-ID: <8200k7$1ff$1@lingo01.bln.innominate.de> NNTP-Posting-Host: gonzo.bln.innominate.de X-Trace: lingo01.bln.innominate.de 943949255 1519 192.168.0.25 (30 Nov 1999 08:07:35 GMT) X-Complaints-To: news@lingo01.bln.innominate.de NNTP-Posting-Date: 30 Nov 1999 08:07:35 GMT User-Agent: tin/pre-1.4-19990517 ("Psychonaut") (UNIX) (Linux/2.2.12-20 (i586)) 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