"Raghunath T" <raghunatht@mindtree.com> writes:
> Now I want the difference between start time and end time in seconds.
> Select date_part('seconds',start_time - end_time) from temp; gives
> me only the difference between the seconds value in both timestamps. It
> ignores all the days, hrs, minutes etc.
Try "date_part('epoch',start_time - end_time)". See
http://www.postgresql.org/devel-corner/docs/postgres/functions-datetime.html
regards, tom lane