Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Playing with dates

Hi,

i have a data set and it contains

start date and enddate.

see below

                                                     

startenddifference
1/12/20151/25/201513.00
1/20/20152/16/201527.00
1/6/20154/1/201585.00
12/3/20141/16/201544.00
12/3/20142/16/201575

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

startenddifference
1/12/20151/25/201513.00
1/20/20151/31/201511.00
1/6/20151/31/201525.00
1/1/20151/16/201515.00
1/1/20151/31/201530.00

Is this possible and any one has and idea how to do this in scrip or UI.

Thanks

2 Replies
MK_QSL
MVP
MVP

Is below same?

set analysis and dates

anuradhaa
Partner - Creator II
Partner - Creator II
Author

yes, no answers to previous one , so i posted it again with different topic