Re: copy command - date

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: novice <user(dot)postgresql(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: copy command - date
Date: 2007-08-13 05:22:30
Message-ID: 46BFEA96.6050408@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

novice schrieb:
> I resolved it by doing this - is there another more efficient method?
> And yes, the text file I am working with doesn't have any TABs
>
> 5162 OK SM 06/12/04 06:12
>
> substr("data", 30, 2)||'-'||substr("data", 27,
> 2)||'-20'||substr("data", 24, 2)||substr("data", 32, 6) as
> inspection_date

You could try to_date() - see:

http://www.postgresql.org/docs/8.2/static/functions-formatting.html

Regards
Tino

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Naz Gassiep 2007-08-13 05:35:41 Re: TimestampTZ
Previous Message Naz Gassiep 2007-08-13 05:19:17 Persistent connections in PHP