Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a data set and it contains
start date and enddate.
see below
start | end | difference | |
1/12/2015 | 1/25/2015 | 13.00 | |
1/20/2015 | 2/16/2015 | 27.00 | |
1/6/2015 | 4/1/2015 | 85.00 | |
12/3/2014 | 1/16/2015 | 44.00 | |
12/3/2014 | 2/16/2015 | 75 |
I have year select box and month select box and used end date in those select boxes.
when user select January,I need to display average difference based on below logic,
1. select records that has start date and end date on January and get the difference
2. If the record has started before January and end on January get the start date as jan 1 and calculate the difference
3. If the record started on January and end after January , consider end date as jan 31 and calculate thedifference.
4. If record started before January and end after January , consider start date as jan 1 and end date as jan 30 and calculate the difference.
This will depend on the selected month
so above table become like this
start | end | difference | |
1/12/2015 | 1/25/2015 | 13.00 | |
1/20/2015 | 1/31/2015 | 11.00 | |
1/6/2015 | 1/31/2015 | 25.00 | |
1/1/2015 | 1/16/2015 | 15.00 | |
1/1/2015 | 1/31/2015 | 30.00 |
Is this possible and any one has and idea how to do this in scrip or UI.
Thanks
Is below same?
yes, no answers to previous one , so i posted it again with different topic