Re: Obtaining the Julian Day from a date
От
Bruno Wolff III
Тема
Re: Obtaining the Julian Day from a date
Дата
Msg-id
20040911013254.GA9447@wolff.to
Ответ на
Re: Obtaining the Julian Day from a date (Karl O. Pinc)
Список
Дерево обсуждения
Obtaining the Julian Day from a date "Karl O. Pinc" <kop@meme.com>
Re: Obtaining the Julian Day from a date Bruno Wolff III <bruno@wolff.to>
Re: Obtaining the Julian Day from a date Phil Endecott <spam_from_postgresql_general@chezphil.org>
On Thu, Sep 09, 2004 at 16:32:18 -0500, "Karl O. Pinc" wrote: > > Unfortunately modulo (%) does not operate on dates so I still need > > to convert to Julian day. :-( I need to know where I am within a > regular repeating interval. Mostly, in my case, modulo 2. > (We arbitrarly decided to begin our interval on Julian Day 0.) If you keep your data in a date field you can get the Julian day by subtracting the appropiate date. You can then do mod on this difference. You could also do the subtraction before storing the data if you want to keep it internally as Julian days.
В списке pgsql-general по дате отправления
От: Randy Yates
Дата: