Results 1 to 3 of 3

Thread: last week -sunday to sunday

  1. #1
    Join Date
    Feb 2006
    Posts
    6

    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

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    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)

  3. #3
    Join Date
    Feb 2006
    Posts
    6

    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
  •