Re: Postgres Date Type Value

Поиск
Список
Период
Сортировка
От Michael Arnold
Тема Re: Postgres Date Type Value
Дата
Msg-id CAMOVWRgDa4scFoY9DxNykGBLh8Xob6fYo4oY8QK6tLJ=DgWDdQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres Date Type Value  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
My bad - was referencing the wrong column with PQgetvalue().  With that corrected, get 8332 for 2022-10-25.  So date is an integer day count from POSTGRES_EPOCH_JDATE (2000-01-01).

Thanks for the help!
---------------

On Sun, Dec 18, 2022 at 8:24 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Sat, Dec 17, 2022 at 4:55 PM Michael Arnold <myk321@gmail.com> wrote:

How do I interpret the 4 bytes of postgresql 'date' value?

See date2j and j2date in datetime.c

timestamp.h has the relevant constant Tom refers to (POSTGRES_EPOCH_JDATE)


David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Postgres Date Type Value
Следующее
От: "Martin L. Buchanan"
Дата:
Сообщение: integer square root function proposed