Obtaining the Julian Day from a date

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Obtaining the Julian Day from a date
Дата
Msg-id 20040909123514.A31452@mofo.meme.com
обсуждение исходный текст
Ответы Re: Obtaining the Julian Day from a date
Re: Obtaining the Julian Day from a date
Список pgsql-general
Hi,

What's the best way to obtain the Julian day from a postgresql
date?

PostgreSQL 7.3.4 on i386-redhat-linux-gnu, compiled by GCC
i386-redhat-linux-gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

I'm doing some date arithmetic with 1 day intervals and want
to, for example, round to the even Julian day.  I suppose
I could always take the interval from julian day zero
and then divide by the number of seconds in a day, but that
sounds both brutal and potentially inaccurate due to leap
seconds and so forth.

There's mention of being able to do  this in the list archives,
but nobody says how it's actually done.

Thanks.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein

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

Предыдущее
От: Frank Finner
Дата:
Сообщение: Re: Upgrading PostgreSQL 7.1.3
Следующее
От: Wes
Дата:
Сообщение: Re: How to determine a database is intact?