Re: Output from 'timestamp' column!?

From: Banghe <banghe(at)baileylink(dot)net>
To: Jack Zhu <jzhu(at)netcom-sys(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Output from 'timestamp' column!?
Date: 2000-05-03 13:53:12
Message-ID: 39102F48.FD9B8B86@baileylink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message bangh 2000-05-03 14:08:13 Re: backup of my database...
Previous Message Ze Luis 2000-05-03 13:28:30 backup of my database...