Re: problem with casting

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: postgresql <pgsql(at)symcom(dot)com>, sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: problem with casting
Date: 2001-02-15 16:30:07
Message-ID: 3A8C040F.E82255AE@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ted,

> responce: can not cast type 'date' to 'text'
>
> Did i miss-read this section. I thought I could cast the date to text. has anyone seen
> this or am I missreading the docs?

'fraid so. You cannot cast Date as Text, because (presumably) the DB
engine doesn't know how you want to format the date. Instead, use the
to_char builtin function, as defined in the docs:
http://www.postgresql.org/users-lounge/docs/7.0/postgres/functions2976.htm

Share & Enjoy!
-Josh Berkus

--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message J.H.M. Dassen Ray 2001-02-15 16:31:31 Re: what means "INSERT xxx yyy" ?
Previous Message mike 2001-02-15 16:18:08 Re: what means "INSERT xxx yyy" ?