Jump to content

Splitting Revenue By Day based on StartDate - EndDate


richardglazer

Recommended Posts

Hi - Newbie here....  Hoping you can help.

 

Looking for help in creating a script that will split revenue across days and output the total revenue by month

 

Example:

 

Startdate: 08/12/2010

Enddate: 10/31/2010

Total Revenue: 10000

 

The script needs to determine total number of days to apply revenue to (based on startdate/enddate) :  80 (19 in aug, 30 in sept, 31 in oct)

 

determine revenue per day = take the total revenue and divide it by numdays 10000/80=125

 

based on the startdate and end date determine how much revenue should be applied to each month and report monthly total.

 

Results should be:

Aug - 2375 (19x125)

Sept - 3750

Oct - 3875

 

I wrote a scripe but im getting confused on the looping etc...

 

Please help!!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.