Re: New and Timestamp Question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Dawn Albrecht <oinee(at)yahoo(dot)com>
Cc: pgsql-chat(at)postgresql(dot)org
Subject: Re: New and Timestamp Question
Date: 2003-08-18 16:14:40
Message-ID: 20030818161440.GA23963@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yahoo(dot)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.

In response to

Browse pgsql-chat by date

  From Date Subject
Next Message daniel 2003-08-22 05:18:33 kylix3 connection problem
Previous Message Bruno Wolff III 2003-08-15 16:31:10 Re: New and Timestamp Question