Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quarterly Period Split

Status
Not open for further replies.

arryb

Programmer
Oct 27, 2003
27
GB
Hi all,

Have a problem with records and dates. Any help/suggestions appreciated.

I have users who enter invoices into a form. Part of the entry criteria is a From and To date. These dates can vary from one month to a year. I need to be able to "split" the input record into seperate records to record each quarter individually. I.E
The qtrs are:
1ST Qtr = 01/01/YY to 31/03/YY
2ND qtr = 01/04/YY to 30/06/YY etc...

Entry of [FROM]02/09/05 and [TO]15/11/05 with a value of £740 would require a split of...
02/09/05 to 30/09/05......3RD2005......£280
01/10/05 to 15/11/05......4TH2005......£460

I have been pondering how to do this for a few days but cannot seem to get my head around how to split the records etc...

Cheers all
__________________
arry
 
Apologies, Wrong amounts supplied.
should be 29 days in 3RD2005 @ 286.13
46 days in 4TH2005 @ 453.87

I just calculated them incorrectly in this example.
Basically i need to divide the total INV amount by the Total number of days covered and * by the days in each qtr.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top