Given a date, how to find the beginning date and ending date of that week

Discussion in 'ASP .Net' started by Matt, Nov 8, 2003.

  1. Matt

    Matt Guest

    My ASPX page has a calendar, and when the user click any date on the
    calendar, it will display the report during that week.

    My question is when the program query database, I need to know the beginning
    date and ending date of that week.

    Any ideas??
    Matt, Nov 8, 2003
    #1
    1. Advertising

  2. On Sat, 8 Nov 2003 11:59:53 -0800, "Matt" <>
    wrote:

    >My ASPX page has a calendar, and when the user click any date on the
    >calendar, it will display the report during that week.
    >
    >My question is when the program query database, I need to know the beginning
    >date and ending date of that week.
    >
    >Any ideas??
    >

    The datepart function will tell you the current day of the week, eg
    Sunday 0, Monday 1, etc. Use the value from that to add to or
    subtract from to get Sunday and Saturday.
    Matthew Speed, Nov 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    495
    Pete Becker
    Nov 8, 2003
  2. Matt
    Replies:
    3
    Views:
    695
    Richard Heathfield
    Nov 8, 2003
  3. Matt
    Replies:
    11
    Views:
    392
    Aaron Bertrand [MVP]
    Nov 8, 2003
  4. Chuck Remes
    Replies:
    7
    Views:
    200
    Gary Wright
    Feb 9, 2010
  5. James Edward Gray II

    [ANN] Red Dirt RubyConf CFP Ending in One Week

    James Edward Gray II, Feb 21, 2010, in forum: Ruby
    Replies:
    0
    Views:
    78
    James Edward Gray II
    Feb 21, 2010
Loading...

Share This Page