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. Advertisements

  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. Advertisements

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:
    737
    Pete Becker
    Nov 8, 2003
  2. Matt
    Replies:
    3
    Views:
    915
    Richard Heathfield
    Nov 8, 2003
  3. Reb

    get the week from the given date

    Reb, Sep 25, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    205
    Ravikanth[MVP]
    Sep 25, 2003
  4. J. Muenchbourg
    Replies:
    0
    Views:
    211
    J. Muenchbourg
    Aug 9, 2003
  5. Matt
    Replies:
    11
    Views:
    624
    Aaron Bertrand [MVP]
    Nov 8, 2003
  6. Chuck Remes
    Replies:
    7
    Views:
    458
    Gary Wright
    Feb 9, 2010
  7. 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:
    189
    James Edward Gray II
    Feb 21, 2010
  8. SimonC
    Replies:
    13
    Views:
    554
    Dr John Stockton
    Jan 4, 2005
Loading...