On Mon, Nov 24, 2003 at 12:15:54AM -0300, Claudio Lapidus wrote:
> But my problem is that to_char truncates the fractional seconds, and I need
> to round the value to the nearest integer second. In the above, I would need
> the output rounded to 15:31:00, which is just a millisecond away, for
> example. But I couldn't find a function to round a timestamp. Are there any
> workaround?
Maybe you can try with EXTRACT(epoch FROM timestamp), rounding that, and
then converting back to a timestamp through abstime. Ugly though ...
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Hoy es el primer día del resto de mi vida"