Received: from servsbs.deltson.com ([212.234.85.57]) by hub.org (8.10.1/8.10.1) with ESMTP id e738fcG40295 for ; Thu, 3 Aug 2000 04:41:38 -0400 (EDT) Received: from ange.alpinfo.fr (ANGE [192.0.1.82]) by servsbs.deltson.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id PT8AVJS2; Thu, 3 Aug 2000 10:34:29 +0200 From: Ange Michel POZZO Reply-To: poange@technologist.com Organization: Alpinfo To: pgsql-sql@postgresql.org Subject: a question about dates and timestamp Date: Thu, 3 Aug 2000 10:24:38 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00080310393100.00710@ange.alpinfo.fr> Content-Transfer-Encoding: 8bit X-Archive-Number: 200008/17 hi all i have a table like this id_message int4 not null default nextval ( ... id_abonne int4 texte_message varchar() not null date_message numeric not null the default size of numeric is 30.6 another table : id_message int4 id_abonne int4 text_message text date_message int4 in both case date_message is used to store a unix timestamp ( number of seconds since 1st of 1970) for example : 965340000 = 2000-08-03 00:00:00+02 my question is how can i convert the numeric or the int4 value to a date value? which function should i use to make something like this work ? select convert_to_date( date_message) from my_table; 2000-08-03 00:00:00+02 2000-08-01 13:56:00+02 etc etc thanks in advance Pozzo Ange