-
HELP... Need to calculate first and last dates for this week, last week, etc...
I think I've been goin about this all wrong. Perhaps I should just say what I'm trying to do and hope that somebody has already done this.
I'm trying to build a SP that given a single variable will return the first and last dates as representations of:
1. this week (input '1' would return 7/30/2000, 8/5/2000)
2. last week (input '2' would return 7/21/2000, 7/29/2000)
3. this month (etc...)
4. last month
5. this quarter
6. last quarter
7. this year
8. last year
I am querying currently querying tables using a date range derived by DATEPART. I am simply trying to get a couple of dates to show the range I am displaying from the DB.
Any help greatly appreciated.
TIA,
Charles
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|