Re: [GENERAL] How to return an Int4 when subtracting dates/timestamps

2010-05-18 Thread Tim Landscheidt
Andre Lopes wrote: > I need to return an Int4 when I do this king of select > [code] > select CURRENT_DATE - '2009-12-31' from tbl_sometable > [/code] > This select returns an Interval. How can I return an Integer? Like '138' That expression returning an interval would be contradictory to the

[GENERAL] How to return an Int4 when subtracting dates/timestamps

2010-05-18 Thread Andre Lopes
Hi, I need to return an Int4 when I do this king of select [code] select CURRENT_DATE - '2009-12-31' from tbl_sometable [/code] This select returns an Interval. How can I return an Integer? Like '138' Sorry my bad english. Best Regards,