Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Get the Sundays ( dates) from a date range
kukkri
I am looking to get all the sundays(the dates ex: 9/11/2011, 9/18/2011 etc) between a date range (ex: 09/01/2011 - 09/30/2011). I then want to group the report by this so I can aggregate the data for the week.
Please advise.
Find more posts tagged with
Comments
Rajesh kmr
You want to group by all the Sunday so you have to populate the data set according to that ..so can you please tell me what data base you are using so that i can provide you the query ..<br />
<br />
or you can write the <strong class='bbc'>when case </strong> query to compare every date with Sunday (as we have certain function to get a particular day from date) and then we can get the date which is Sunday.
paulk
I would create a calculated column in the dataset based on a hard coded date known to be a sunday. The calculated column would be the number of full weeks since your hard coded date.
[ie. ROUNDDOWN((dynamicdate - sundaydate)/7) if date1-date2 returns in # of days]
You can then group your report on this column. Everything Sunday-Saturday will have the same week number.