List:General Discussion« Previous MessageNext Message »
From:Bedford Bob Date:May 18 2006 9:43am
Subject:duration query: how to ?
View as plain text  

My clients can put their articles on my website. They pay for the real
utilisation of the site. If a client has used 2 slots for all year, then he
pays for them.

Now my articles table has a starddate (when the client has started to sell
his product) and an enddate (when the article is sold).

I'd like to retrieve the total amount of time the articles have been in the
site from 2005-01-01 to 2005-01-31 and divide them by 365 (or 366 if leap

if an article has been online from 2004-10-01 to null (meaning the article
hasn't been sold yet) then I may count 365 days

How to do so with a query ? fields are client.idclient, article.idclient,
article.idarticle, article.startdate, article.enddate.

Please help me, I don't know how to retrieve those values and I need them to
get payed.


duration query: how to ?Bedford Bob18 May
  • Re: duration query: how to ?Barry18 May
  • Re: duration query: how to ?Peter Brawley18 May
  • Re: duration query: how to ?John Hicks18 May