From: Ange Michel POZZO <poange@technologist.com>
To: pgsql-sql@postgresql.org
Subject: a question about dates and timestamp
Date: Thu, 3 Aug 2000 10:24:38 +0200
Message-ID: <00080310393100.00710@ange.alpinfo.fr> (raw)
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
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: poange@technologist.com
Subject: Re: a question about dates and timestamp
In-Reply-To: <00080310393100.00710@ange.alpinfo.fr>
References: <00080310393100.00710@ange.alpinfo.fr>
* 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