Re: New and Timestamp Question - Mailing list pgsql-chat

From Bruno Wolff III
Subject Re: New and Timestamp Question
Date
Msg-id 20030818161440.GA23963@wolff.to
Whole thread Raw
In response to Re: New and Timestamp Question  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-chat
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.

pgsql-chat by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: New and Timestamp Question
Next
From: "daniel"
Date:
Subject: kylix3 connection problem