Re: date time function
От | John D. Burger |
---|---|
Тема | Re: date time function |
Дата | |
Msg-id | C4E2800F-7F62-4526-8739-CB08DD78B22B@mitre.org обсуждение исходный текст |
Ответ на | Re: date time function (Michael Glaesemann <grzm@seespotcode.net>) |
Ответы |
Re: date time function
Re: date time function |
Список | pgsql-general |
I can't anything in the docs that explain how intervals print out. They seem to show like this: > select now() - '1990-01-01'; ?column? ------------------------------- 6388 days 13:06:26.3605600595 or like this: > select now() - current_date; ?column? ----------------- 14:06:46.119788 unless you use age(), which supposedly also returns an interval: > select age(now(), '1990-01-01'); age ----------------------------------------- 17 years 5 mons 28 days 14:08:04.524803 Why do the first and third intervals print out differently? I see this in the docs for age: Subtract arguments, producing a "symbolic" result that uses years and months But age() is documented as simply producing an interval - where is the magic that makes the first and third results above look different? Ah, wait a minute - does this have to do with the varying number of days in different months? Thanks. - John D. Burger MITRE
В списке pgsql-general по дате отправления: