Hello,
I have a short equstio anbout the age command:
When I use for example
age(timestamp('2002-08-13'), timestamp('2002-08-12')
I get "1 day" and for
age(timestamp('2002-08-13'), timestamp('2002-07-13')
I get "1 mon".
But what I need is the total difference in days as integer.
How can I get this?
Thanks,
Jan
--
Jan Theofel Fon: +49 (7 11) 48 90 83 - 0
ETES - EDV-Systemhaus GbR Fax: +49 (7 11) 48 90 83 - 50
Libanonstrasse 58 A * D-70184 Stuttgart Web: http://www.etes.de
______________________________________
Inflex - eMail Scanning and Protection
Queries to: postmaster@etes.de
Jan Theofel <theofel@etes.de> writes:
> But what I need is the total difference in days as integer.
Subtract the dates.
regression=# select date('2002-08-13') - date('2002-07-13');
?column?
----------
31
(1 row)
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера