-
last week -sunday to sunday
Hi all,
i am trying to create a date function that will allow me to define last week,so far so good, but creating last week starting from sunday & ending at sunday,well here is my problem...
will appreciate any directions
10'xs
yoav
-
SELECT convert(char(10), DATEADD(week,DATEDIFF(week, 5, getdate()), -8), 101);
SELECT convert(char(10), DATEADD(week,DATEDIFF(week, 5, getdate()), -7), 101);
...
SELECT convert(char(10), DATEADD(week,DATEDIFF(week, 5, getdate()), -1), 101)
-
last week -sunday to sunday
10xs rmiao!!!
it worked!
yoav
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
|
|