From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shankar K <shan0075@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: timestamp with timezone
Date: Fri, 12 Sep 2003 20:09:10 -0400
Message-ID: <434.1063411750@sss.pgh.pa.us> (raw)
In-Reply-To: <20030912174106.87224.qmail@web21101.mail.yahoo.com>
References: <20030912174106.87224.qmail@web21101.mail.yahoo.com>
Shankar K <shan0075@yahoo.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, shan0075@yahoo.com
Subject: Re: timestamp with timezone
In-Reply-To: <434.1063411750@sss.pgh.pa.us>
References: <20030912174106.87224.qmail@web21101.mail.yahoo.com> <434.1063411750@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox