Re: [GENERAL] Q: How to convert int to date?

From: Patrice Hédé <patrice(at)idf(dot)net>
To: Mattias Kregert <matti(at)algonet(dot)se>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Q: How to convert int to date?
Date: 1998-06-23 16:31:00
Message-ID: Pine.LNX.3.96.980623182925.26162A-100000@paris.ivo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 23 Jun 1998, Mattias Kregert wrote:

> How do I convert INTEGER to DATE in 6.3.2?
>
> I have a table 'mytbl' with a column 'd' which is
> an integer, containing dates in YYMMDD form. Now,
> how do I convert these integer dates to date dates?

I tried to do :

test=> SELECT 980623::text::date;
?column?
----------
23-06-0098
(1 row)

Maybe you should try something along this way :)

Patrice

--
Patrice HÉDÉ --------------------------------- patrice(at)idf(dot)net -----
Nous sommes au monde. [...] La croyance en un esprit absolu ou en un
monde en soi détaché de nous n'est qu'une rationalisation de cette
foi primordiale. --- Merleau-Ponty, Phénoménologie de la Perception
----- http://www.idf.net/patrice/ ----------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrice Hédé 1998-06-23 16:41:25 Re: [GENERAL] Q: How to convert int to date?
Previous Message Peter Cordone 1998-06-23 12:52:46 Looking for a CASE tool that will normalize databases.