Re: Calculating Differences Between Dates - Problem

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Calculating Differences Between Dates - Problem
Дата
Msg-id 20030110210258.GA27412@wolff.to
обсуждение исходный текст
Ответ на Calculating Differences Between Dates - Problem  (Hunter Hillegas <lists@lastonepicked.com>)
Ответы Re: Calculating Differences Between Dates - Problem  (Simon Mitchell <pgsql@jseb.com>)
Список pgsql-general
On Fri, Jan 10, 2003 at 12:35:37 -0800,
  Hunter Hillegas <lists@lastonepicked.com> wrote:
> I am trying to calculate the number of days between two dates.

Just subtract the dates from each other. The result will be an integer type
with the number of days between the two dates.

> date_shipped: 2002-12-16
> date_of_request: 2002-10-29
> date_difference: 18
> NOT OK - it is more days than this.

You are just comparing the days of the month, not the actual days.

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

Предыдущее
От: Hunter Hillegas
Дата:
Сообщение: Calculating Differences Between Dates - Problem
Следующее
От: "Ian Harding"
Дата:
Сообщение: Demo System...