Re: New and Timestamp Question

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: New and Timestamp Question
Дата
Msg-id 20030818161440.GA23963@wolff.to
обсуждение исходный текст
Ответ на Re: New and Timestamp Question  (Bruno Wolff III <bruno@wolff.to>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: New and Timestamp Question
Следующее
От: "daniel"
Дата:
Сообщение: kylix3 connection problem