From: Bruno Wolff III <bruno@wolff.to>
To: Dawn Albrecht <oinee@yahoo.com>
Cc: pgsql-chat@postgresql.org
Subject: Re: New and Timestamp Question
Date: Mon, 18 Aug 2003 11:14:40 -0500
Message-ID: <20030818161440.GA23963@wolff.to> (raw)
In-Reply-To: <20030818135203.24022.qmail@web11507.mail.yahoo.com>
References: <20030815163110.GA10617@wolff.to>
<20030818135203.24022.qmail@web11507.mail.yahoo.com>
You should keep discussions on the list as other people may be able to help you
and other people might be interested in any solutions that are given.
On Mon, Aug 18, 2003 at 06:52:03 -0700,
Dawn Albrecht <oinee@yahoo.com> wrote:
> I have searched the list archives, but have not found
> anything that specifically addresses this. Where
> would you use the to_char? I want to change the view
> of it in the actual table but still be treated as a
> date/time.
This sounds like you are trying to do something like you might for a
spread sheet where you can supply formats for outputting data for
the various columns.
Things don't work like that in Postgres (and probably most databases).
When you want to look at the data, you use formatting functions such
as to_char to provide output in the desired format.
So to see time in a 12 hour format you might do something like:
select to_char(column,'HH12:MI');
If you don't want to scatter to_char's all over the place, then you might
want to create view and use that to look at the table.
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-chat@postgresql.org
Cc: bruno@wolff.to, oinee@yahoo.com
Subject: Re: New and Timestamp Question
In-Reply-To: <20030818161440.GA23963@wolff.to>
References: <20030815163110.GA10617@wolff.to> <20030818135203.24022.qmail@web11507.mail.yahoo.com> <20030818161440.GA23963@wolff.to>
* 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