X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1CD73D1B529 for ; Sat, 13 Sep 2003 00:09:18 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 84615-06 for ; Fri, 12 Sep 2003 21:09:10 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 19880D1B4FE for ; Fri, 12 Sep 2003 21:09:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h8D09AAn000435; Fri, 12 Sep 2003 20:09:10 -0400 (EDT) To: Shankar K Cc: pgsql-admin@postgresql.org Subject: Re: timestamp with timezone In-reply-to: <20030912174106.87224.qmail@web21101.mail.yahoo.com> References: <20030912174106.87224.qmail@web21101.mail.yahoo.com> Comments: In-reply-to Shankar K message dated "Fri, 12 Sep 2003 10:41:06 -0700" Date: Fri, 12 Sep 2003 20:09:10 -0400 Message-ID: <434.1063411750@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/225 X-Sequence-Number: 10313 Shankar K writes: > some has centiseconds in them along with TZ. Now i'm > wondering is there a way to just extract date and > timestamp alone leaving the centisecods as well the TZ > part. You mean you want to round off to even seconds? Try date_trunc, or cast to "timestamp(0) with time zone". To force stuff to be rounded when it's stored, declare the column like that in the first place. regards, tom lane