Re: Convert TimeStamp to Date

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: Claudio Lapidus <clapidus(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org, shuai(at)objectwareinc(dot)com
Subject: Re: Convert TimeStamp to Date
Date: 2003-07-23 22:36:34
Message-ID: 3F1F0DF2.9020106@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Ron Johnson wrote:

>tree=# select date('1993-08-10 17:48:41.074');
> date
>------------
> 10-08-1993
>(1 row)
>
>
>
This *does* work on 7.3 (I suppose, because it ends up converting *text*
to date, not *timestamp*, and it is timestamp conversion, that's broken):

testdb=# select date('1993-08-10 17:48:41.074'::timestamp);
date
------------
1993-08-11
(1 row)

Dima

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-07-24 00:31:15 Re: [GENERAL] Convert TimeStamp to Date
Previous Message Ron Johnson 2003-07-23 22:17:01 Re: Convert TimeStamp to Date

Browse pgsql-general by date

  From Date Subject
Next Message Errol Neal 2003-07-23 22:39:04 Re: Increasing Max # of connections
Previous Message Ron Johnson 2003-07-23 22:17:01 Re: Convert TimeStamp to Date