Re: time format - Mailing list pgsql-hackers

From Martin Marques
Subject Re: time format
Date
Msg-id 200401040954.25708.martin@bugs.unl.edu.ar
Whole thread Raw
In response to Re: time format  (ivan <iv@psycho.pl>)
Responses Re: time format  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
El Sáb 03 Ene 2004 18:20, ivan escribió:
> ok, bat each time where i want to do select .. a nie tu use to_char,
> but it should be in function timestamp_out to convert time to string
> it would be easer and faster.

Look deeper into what Christopher said and use casting to get the right
output:

prueba=> select now();             now
-------------------------------2004-01-04 09:53:41.131079-03
(1 row)

prueba=> select now()::timestamp(0);        now
---------------------2004-01-04 09:53:43
(1 row)


Get the difference?

-- 09:52:01 up 39 days, 16:08,  2 users,  load average: 0.60, 0.71, 0.72
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador            Universidad Nacional                 del Litoral
-----------------------------------------------------------------



pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: psql \d option list overloaded
Next
From: Michael Meskes
Date:
Subject: Re: ecpg's minor bug