I want the no of days into a column which is defined as integer in a table i.e.,
select age('2013-04-06','2013-04-04') --> gives me 2days as output
i want that 2 days to be stored into a column with datatype integer.. i tried this but i am getting the no of hours from this query..
SELECT (EXTRACT(epoch FROM (select age('2013-07-06','2013-07-04')))/3600); --> 48 i.e., 48 hours as output
i need the integer value(2) from the 2 days or from the 48 hours
How to get this to be done?