Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2006
    Posts
    3

    Unanswered: getting last Saturday's date

    Hi,

    Does anyone know of a way to get the date for last Saturday in Sybase, given a date?

    For example, if today is 02/13/07, then is there some date function that would give me 02/10/07?

    I would need it to work for any date given, so that 2/11, 2/12, 2/13, 2/14, etc would all return 2/10.

    Thanks

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    select dateadd(dw, -(datepart(dw,'02/13/07')), '02/13/07')
    --------------------------
    Feb 10 2007 12:00AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •