Re: Casting timestamp with time zone to varchar automatically

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Casting timestamp with time zone to varchar automatically
Date: 2004-08-03 06:57:36
Message-ID: 66A83ED2-E51A-11D8-8966-000A95C88220@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 3, 2004, at 3:12 PM, Jim C. Nasby wrote:

> Is there any reason why there isn't a predefined cast to go from a
> timestamp to a varchar? Is there a reason not to add one?

to_char should do what you need. People often need a specific form of
timestamp if they need it to be a text value (rather than a native
timestamp data type). to_char provides lots of flexibility

Michael Glaesemann
grzm myrealbox com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gellert, Andre 2004-08-03 08:41:56 Are Packages for PostgreSQL 7.4.x for Solaris 9 64bit available ?
Previous Message Markus Bertheau 2004-08-03 06:15:50 Re: [ANNOUNCE] == PostgreSQL Weekly News - August 1st 2004 ==