Re: Timestamp, fractional seconds problem

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Laurette Cisneros <laurette(at)nextbus(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Timestamp, fractional seconds problem
Date: 2001-10-04 09:01:26
Message-ID: 20011004110126.A20096@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Wed, Oct 03, 2001 at 05:02:59PM -0700, Laurette Cisneros wrote:

> A work around for display might be to use to_char().

In 7.2 is possible use millisecond / microsecond format:

# select to_char(now()+'2s 324 ms'::interval, 'HH:MM:SS MS');
to_char
--------------
10:10:59 324
(1 row)

# select to_char(now()+'2s 324 ms 10 microsecon'::interval, 'HH:MM:SS US');
to_char
-----------------
10:10:03 324010
(1 row)

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lincoln Yeoh 2001-10-04 09:47:57 Re: Feature suggestion: Postgresql binding to one
Previous Message Michael Meskes 2001-10-04 06:34:01 Re: My last ECPG commit

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heitzso 2001-10-04 14:09:12 Re: are \r \n and \t legal in
Previous Message Roger Oed 2001-10-04 08:41:39 JDBC 2.0