Re: International Date formats

From: "Daniel T(dot) Staal" <DStaal(at)usa(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: International Date formats
Date: 2007-04-25 15:57:57
Message-ID: 63505.63.172.115.138.1177516677.squirrel@MageHandbook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Wed, April 25, 2007 11:50 am, Gary Warner said:

> Does anyone have a suggestion for being able to store "dates" parsed
> from email headers that would handle a fairly international set of
> formats? Or do I need to do date-conversion prior to trying to store?
>
> currently choking on things like "Ene-18-2007" (Enero = January) and
> "Sau-20-2007" or "Oca-29-2007" or (I have no idea what "Sau" or "Oca"
> are) and we especially don't seem to like dates that my 7-bit Windows
> window calls things like: "╤│≈-11-2007"

I'd say either store them as a string (If you don't need to do date
comparisons), or find a date conversion package that can handle
everything. (I'd suggest taking a look at Perl modules, they are likely
to have something which you could integrate fairly easily.)

There are a million and one different date formats; either you spend all
your time figuring out new ones, or you support a few common ones and
spend your time on other things. The Postgres team follows the latter.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message kvnsmnsn 2007-04-25 16:23:12 how to conditionally append
Previous Message Gary Warner 2007-04-25 15:50:09 International Date formats