| От | Andreas |
|---|---|
| Тема | How cast interval to minutes as number? |
| Дата | |
| Msg-id | 4749279A.8010805@gmx.net обсуждение исходный текст |
| Ответы |
Re: How cast interval to minutes as number?
Re: How cast interval to minutes as number? |
| Список | pgsql-novice |
Hi, I have a column with timestamps --> some_ts . I'd like to calculate the amount of time between this timestamp and NOW(). select some_ts - NOW() from some_table; This results in a column of type interval. How would I get this interval converted into e.g. minutes. I need the whole value converted not just the 0-59 minutes part. Like a difference of exactly 1 day = 24*60 minutes rather than 0 minutes if I just take the minute-part. Seconds would be fine, too. select EXTRACT (EPOCH FROM INTERVAL some_ts - NOW()) from .... gets me a syntax error Help? Regards Andreas
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера