On Thu, 2006-01-05 at 10:04, Tadej Kanizar wrote:
> Hi!
>
>
>
> I’ve got a timestamp field.. and it returns sth like “2006-01-04
> 21:33:17.156”. How can I get the same result, just without the .156?
> I’ve looked at date/time formatting functions, etc, but couldn’t find
> a straight way to do
"Tadej Kanizar" <[EMAIL PROTECTED]> writes:
> I've got a timestamp field.. and it returns sth like "2006-01-04
> 21:33:17.156". How can I get the same result, just without the .156?
Cast to timestamp(0).
regards, tom lane
---(end of broadcast)-
Either date_trunc
eg, SELECT date_trunc('hour', TIMESTAMP '2001-02-16 20:38:40');
Result: 2001-02-16 20:00:00
Or format the timestamp as a string
select to_char(now(), '-mm-dd HH24:MI:SS');
Hope that helps.
John
Tadej Kanizar wrote:
Hi!
I've got a timestamp field.. and it returns s