Re: Date Questions

Поиск
Список
Период
Сортировка
От Robert Sanford
Тема Re: Date Questions
Дата
Msg-id B7FA3B7327F5D043AB403A1E0709628CECDC26@exchg3.corp.orrtax.local
обсуждение исходный текст
Ответ на Re: Date Questions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Every app has its joyful inconsistencies and learning them is part of
the process...

So if I'm currently doing a GROUP BY date_part(week, datecolumn) in a
view and  I really want to be using the DOW convention I need to write a
customized get_sunday_week_num (date) to make everything consistent. Or,
did someone else run into this problem and solve it before me?

rjsjr

PS - Coming from an MS-SQL Server background I *love* the date
functionality in PostgreSQL.

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Tuesday, January 23, 2007 5:40 PM
> To: Robert Sanford
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Date Questions
>
> "Robert Sanford" <rsanford@trefs.com> writes:
> > It appears to me that there is some inconsistency in the date
> > calculations for my PostgreSQL install (version 8.0 on Win32).
>
> extract(DOW) follows the convention that the week starts on
> Sunday, but extract(WEEK) uses the ISO convention, which
> includes weeks starting on Monday.  No, it's not super
> consistent, but hardly anything about date/time conventions is :-(
>
>             regards, tom lane
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: dump desde dentro de una base
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Date Questions