Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have Calculated Ageing (Today() - Creation_Date). This Ageing i will use for Buckets (0-2 Days, 2-5 Days).
What i need is to exclude Number of Sundays falling between Ageing.
eg. 3/10/2013 - 21/10/2013 = 17 Days coming as per Formula but the Final Answer should be 14 since 3 Sundays falling betwwen these 2 dates.
Suggest some solution for it.
Thanks in Advance.
Maybe similat to this:
LOAD (today()-Creation_Date) - Div(Today()-Creation_Date,7) + (weekday(Creation_Date)>weekDay(Today())) as Ageing,
Creation_Date
INLINE [
Creation_Date
20.10.2013
13.10.2013
19.10.2013
11.10.2013
14.10.2013
03.10.2013
03.10.2013 13:15:00
];
Calculate the difference between the two dates, subtract the number of full weeks passed, and then check if remaining days passed a week border (if true, this will add -1).
Maybe similat to this:
LOAD (today()-Creation_Date) - Div(Today()-Creation_Date,7) + (weekday(Creation_Date)>weekDay(Today())) as Ageing,
Creation_Date
INLINE [
Creation_Date
20.10.2013
13.10.2013
19.10.2013
11.10.2013
14.10.2013
03.10.2013
03.10.2013 13:15:00
];
Calculate the difference between the two dates, subtract the number of full weeks passed, and then check if remaining days passed a week border (if true, this will add -1).
Thank You Sir. You are Great. Perfect.
I Really Love your Answers. Short and Simple + Powerful.
Your logic was really helpful for me. Thanks a lott.
But i have some additional requirement in which i have to exclude Sundays and National Holidays.
Please Help..