Re: Importing data w/ Unix timestamp

From: brianb-pggeneral(at)edsamail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Importing data w/ Unix timestamp
Date: 2000-06-29 07:45:56
Message-ID: 20000629074556.20649.qmail@mail01.edsamail.com.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


brianb-pggeneral(at)edsamail(dot)com writes:

>
> I want to copy in some data from a tab-delimited flat file, but one of the
> columns that should translate into a datetime is in Unix timestamp format
> (seconds since epoch).
>
> The data should go into this table:
> create table logins (
> uname varchar(100),
> timein datetime,
> duration int,
> cid varchar(20),
> natip varchar(20)
> );
>
> But it looks like this in the comma-delimited flatfile:
>
> bob 957974401 17 8325824 210.16.68.250
> james 957974401 13 3737270 210.16.68.250
> edwin 957974402 201 3672136 210.16.68.250
> steph 957974404 25 9398998 210.16.68.250
> mitch 957974406 7 7221757 210.16.68.250

I forgot to mention that the error returned is:
ERROR: copy: line 1, Bad timestamp external representation '957974401'

Thanks,
Brian
--
Brian Baquiran <brianb(at)edsamail(dot)com>
http://www.baquiran.com/ AIM: bbaquiran
Work: (632)7182222 Home: (632)9227123

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nico D 2000-06-29 10:13:51 ORDBMS vs OODBMS
Previous Message brianb-pggeneral 2000-06-29 07:33:15 Importing data w/ Unix timestamp