I think this a database to database issue.
In Oracle, you can just subtract the two dates and the answer returned is the number of days.
Example:
select to_date('1-sep-02') - to_date('4-feb-02')
from dual ;
returns the number 209
If the date values are timestamps (i.e. containt hours, minutes, seconds) then the number returned would also containt the fraction of a day, e.g. 209.34.
I'm not as certain for other DB's such as SQLServer, Access, DB2, etc., but I'm sure each implementation has its own method for finding the number of days between two dates.