At 22:18 +0200 on 29/03/1999, Rick Dearman wrote: > > I want the number of seconds since 1970 Basically, the function date_part( 'epoch', expression_of_datetime_type ) returns the number of seconds since 1970. But it returns a float, not an integer, because datetimes can include milliseconds etc. For example: testing=> select date_part( 'epoch' , '1999-03-01 07:38:01.10'::datetime); date_part ----------- 920266681.1 (1 row) So, you may either write your program to expect a float there (float8), or you can force it to be an integer using the function int() around the date_part function. But then you lose the milliseconds. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера