Re: timestamp with timezone

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shankar K <shan0075(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: timestamp with timezone
Date: 2003-09-13 00:09:10
Message-ID: 434.1063411750@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Shankar K <shan0075(at)yahoo(dot)com> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Shankar K 2003-09-13 01:36:52 Re: timestamp with timezone
Previous Message Héctor A. Albospino 2003-09-12 20:51:49 unsubscribe