Re: Date calc/comparisions

Поиск
Список
Период
Сортировка
От Mitch Vincent
Тема Re: Date calc/comparisions
Дата
Msg-id 003d01c13688$be7c8bd0$f8165dd8@mitch
обсуждение исходный текст
Ответ на Date calc/comparisions  ("Brent R. Matzelle" <bmatzelle@yahoo.com>)
Ответы Re: Date calc/comparisions  ("Brent R. Matzelle" <bmatzelle@yahoo.com>)
Список pgsql-php
You could do

SELECT EXTRACT(EPOCH FROM <timestamp>);

-- To get epoch, then use PHP to do the date calculation.. You could do the
calculation in the database too, though..

Check out
http://postgresql.crimelabs.net/users-lounge/docs/7.1/user/functions-datetim
e.html

----- Original Message -----
From: "Brent R. Matzelle" <bmatzelle@yahoo.com>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, September 05, 2001 1:24 PM
Subject: [PHP] Date calc/comparisions


> I need to know if the date returned from a TIMESTAMP field is less than 24
hours old.
> However, PHP does not understand how to compare times retrieved from
PostgreSQL.
> Have any of you any experience with this type of calculation?
>
> Thanks and warm regards,
>
> Brent
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


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

Предыдущее
От: "Brent R. Matzelle"
Дата:
Сообщение: Date calc/comparisions
Следующее
От: "Brent R. Matzelle"
Дата:
Сообщение: Re: Date calc/comparisions