| От | Magnus Naeslund(f) |
|---|---|
| Тема | Re: convert integer to interval ? |
| Дата | |
| Msg-id | 004d01c2cfa6$2d71d1f0$f80c0a0a@mnd обсуждение исходный текст |
| Ответ на | convert integer to interval ? (pilsl@goldfisch.at) |
| Ответы |
Re: convert integer to interval ?
|
| Список | pgsql-general |
pilsl@goldfisch.at wrote: > Sorry, I dont get familar with timefunctions in 7.3.2. I just > upgraded and I need a function that adds a given interval in days to a > given timestamp. > > something like > select current_timestamp+interval '7 days'; > > in my table the 7 is given as integer. And I dont get the conversion > from this integer to interval where the integernumber is in days. Is there any reason why you can't do: sprintf(buf,"select current_timestamp+interval '%d days'",int_days); Magnus
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера