G
Guest
I need to return a value for a whole or a part of a month. This is to be used
for an invoicing system.
Example: A subscription is priced on a monthly basis. A subscription that is
active for a whole month should be invoiced for the value '"1" multiplied
with the monthly price.
A subscription that is active from april 14th, should be invoiced for the
value "0,53" (the part of april where the subscription has been active),
multiplied with the monthly price. The problem arrises as there ar different
numbers of days in each month. If I should invoice th subscription starting
the 14th og april until the 30th of june, the value to multiply the monthly
price with is 2,53.
Do anyone know how to calculate this value in a query when the start and end
date is available in the query?
for an invoicing system.
Example: A subscription is priced on a monthly basis. A subscription that is
active for a whole month should be invoiced for the value '"1" multiplied
with the monthly price.
A subscription that is active from april 14th, should be invoiced for the
value "0,53" (the part of april where the subscription has been active),
multiplied with the monthly price. The problem arrises as there ar different
numbers of days in each month. If I should invoice th subscription starting
the 14th og april until the 30th of june, the value to multiply the monthly
price with is 2,53.
Do anyone know how to calculate this value in a query when the start and end
date is available in the query?