I'm trying to calculate the number of days a particular property is vacant.
From this query...
SELECT Properties.PropId, Tenants.TenantId, Tenants.PropertyID, Tenants.TenantAdress, Tenants.MoveIn, Tenants.MoveOut, Properties.P_GpNo FROM Properties, Tenants WHERE Tenants.PropertyID=Properties.PropId AND Properties.P_GpNo ="3" AND TenantAdress = "5"
ORDER BY Tenants.TenantId
It returns..
MoveIn MoveOut
5 4 005 5 2012-12-28 2013-04-13 3
5 20 005 5 2013-05-01 2014-09-30 3
5 41 005 5 2014-10-03 NULL 3
I need to find the # of days between 2013-04-13 and 2013-05-01, and again between 2014-09-30 and 2014-10-03
Any Ideas?
Thank you