Received: from mocha2.baileylink.net (IDENT:qmailr@mocha2.baileylink.net [63.71.213.28]) by hub.org (8.9.3/8.9.3) with SMTP id JAA58681 for ; Wed, 3 May 2000 09:46:24 -0400 (EDT) (envelope-from banghe@baileylink.net) Received: (qmail 965 invoked from network); 3 May 2000 13:46:08 -0000 Received: from chengdu.kona.baileylink.net (HELO baileylink.net) (63.71.216.15) by mocha2.baileylink.net with SMTP; 3 May 2000 13:46:08 -0000 Message-ID: <39102F48.FD9B8B86@baileylink.net> Date: Wed, 03 May 2000 08:53:12 -0500 From: Banghe X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Jack Zhu CC: pgsql-admin@postgresql.org Subject: Re: Output from 'timestamp' column!? References: Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/15 You just need to cut this column. e.g. use perl you can use: new_column = substr(old_column, 0, 19) Or you can use the function to convert to what you want when you select this column from the table. Check functions -- Banghe Jack Zhu wrote: > Hi, all: > > PostgreSQL 7 Beta 5 on Red hat Linux 6.0 > > We have a a table which has a column col_a with 'timestamp' data type. When > insert time value to this column, we use format which is 'MM/DD/YYYY > HH24:MI:SS' (such as '05/01/2000 13:20:02'). Insertion is OK. > > But when we try to read this column, the output is '05/01/2000 > 13:20:02.20-04', which is not what we need. We don't need the '.20-04' part > of the output, that is nano second and time zone part. > > Is there any ways that make the output doesn't contain the nano second and > time zone part? > > Thnx a lot! > > Jack