Looking for help in creating a script that will split revenue across days and output the total revenue by month (which will vary as startdate could be in middle of month).
Total Revenue: 10000
The script needs to determine total number of days: 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
Sept - 3750
Oct - 3875
I wrote a scripe but im getting confused on the looping etc…