pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: postgresql <pgsql@symcom.com>
To: sqllist <pgsql-sql@postgresql.org>
Subject: Re: problem with casting
Date: Thu, 15 Feb 2001 08:30:07 -0800
Message-ID: <3A8C040F.E82255AE@agliodbs.com> (raw)
References: <200102142105.f1EL5fx84448@mail.postgresql.org>

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@agliodbs.com
    and data management solutions       (415) 565-7293
   for law firms, small businesses       fax  621-2533
    and non-profit organizations.       San Francisco



view thread (3+ messages)

Message-ID: <3A8C040F.E82255AE@agliodbs.com>
Permalink:  ../3A8C040F.E82255AE@agliodbs.com/
Also on:    postgresql.org/message-id/3A8C040F.E82255AE@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, pgsql@symcom.com
  Subject: Re: problem with casting
  In-Reply-To: <3A8C040F.E82255AE@agliodbs.com>
  References: <200102142105.f1EL5fx84448@mail.postgresql.org> <3A8C040F.E82255AE@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox