richardglazer Posted August 20, 2010 Share Posted August 20, 2010 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!! Quote Link to comment https://forums.phpfreaks.com/topic/211327-splitting-revenue-by-day-based-on-startdate-enddate/ Share on other sites More sharing options...
RussellReal Posted August 20, 2010 Share Posted August 20, 2010 you need to be more clear, you're very vague and I don't think any1 here can understand what you want Quote Link to comment https://forums.phpfreaks.com/topic/211327-splitting-revenue-by-day-based-on-startdate-enddate/#findComment-1101873 Share on other sites More sharing options...
kickstart Posted August 20, 2010 Share Posted August 20, 2010 Hi Where are the details (ie, dates and revenue amounts) coming from? All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/211327-splitting-revenue-by-day-based-on-startdate-enddate/#findComment-1101874 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.