| От | Mike Ginsburg |
|---|---|
| Тема | Interval Rounding |
| Дата | |
| Msg-id | 4660535F.9020205@collaborativefusion.com обсуждение исходный текст |
| Ответы |
Re: Interval Rounding
|
| Список | pgsql-general |
Hello, I have a table that contains a user's response and a timestamp at which it was last updated. I want to query for this response, and the amount of time that has elapsed since, rounded to the nearest unit (e.g. minutes, days, months, etc). I am using: SELECT NOW() - change_time FROM ... to get the interval, and am attempting to use either EXTRACT() or DATE_PART() to get the appropriate value, but the interval doesn't contain any unit higher than days. Any thoughts on how I could accomplish this? Thanks in advance Mike Ginsburg Collaborative Fusion, Inc. mginsburg@collaborativefusion.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера