Re: datestyle question - Mailing list pgsql-general

From Scott Marlowe
Subject Re: datestyle question
Date
Msg-id dcc563d10709261524w33c4700bx9d28644376467b31@mail.gmail.com
Whole thread Raw
In response to datestyle question  (Diego Gil <diego@adminsa.com>)
Responses Re: datestyle question  (Diego Gil <diego@adminsa.com>)
Re: datestyle question  (Erik Jones <erik@myemma.com>)
List pgsql-general
On 9/26/07, Diego Gil <diego@adminsa.com> wrote:
> Hi,
>
> I have a file to import to postgresql that have an unusual date format.
> For example, Jan 20 2007 is 20022007, in DDMMYYYY format, without any
> separator. I know that a 20072002 (YYYYMMDD) is ok, but I don't know how
> to handle the DDMMYYYY dates.
>
> I tried and tried but I can't import those dates to postgresql.
>
> Any hint, other than editing file ?

There are two approaches.  One is to use something like sed or awk or
perl or php to read the file and rearrange those bits to a format that
makes sense to pgsql, or you can import that field into a text field,
and use something like substring() in postgresql to update a new field
that holds dates with the right numbers.

pgsql-general by date:

Previous
From: Erik Jones
Date:
Subject: Re: datestyle question
Next
From: "TUC Solutions"
Date:
Subject: Arabic Language