On 8/12/07, novice <user.postgresql@gmail.com> wrote:
> 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
I didn't have to do anything special, just copied it in:
create table g (ts timestamp);
set datestyle=ISO, MDY;
copy g (ts) from stdin;
06/12/04 12:00:00
\.
select * from g;
ts
---------------------
2004-06-12 12:00:00
delete from g;
set datestyle=ISO, DMY;
copy g (ts) from stdin;
06/12/04 12:00:00
\.
select * from g;
ts
---------------------
2004-12-06 12:00:00