get the week from the given date

Discussion in 'ASP .Net Web Controls' started by Reb, Sep 25, 2003.

  1. Reb

    Reb Guest

    How can I get the week from the given date using the
    calendar control?
    E.g., If i choose a date, it must return me which week of
    the year it is?

    thanks
     
    Reb, Sep 25, 2003
    #1
    1. Advertising

  2. Hi

    Try this:
    Dim myDATE as date
    Dim myYear, myWeek as integer

    myDATE = date.parse("1.1." & myYear.ToString)
    myDATE = myDATE.date.AddDays(7 * (myWeek-1) -
    myDATE.DayOfWeek)

    Please check the following url
    http://p2p.wrox.com/topic.asp?TOPIC_ID=2682

    HTH
    Ravikanth[MVP]


    >-----Original Message-----
    >How can I get the week from the given date using the
    >calendar control?
    >E.g., If i choose a date, it must return me which week

    of
    >the year it is?
    >
    >thanks
    >.
    >
     
    Ravikanth[MVP], Sep 25, 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:
    1
    Views:
    609
    Matthew Speed
    Nov 8, 2003
  2. Matt
    Replies:
    2
    Views:
    520
    Pete Becker
    Nov 8, 2003
  3. Matt
    Replies:
    3
    Views:
    724
    Richard Heathfield
    Nov 8, 2003
  4. J. Muenchbourg
    Replies:
    0
    Views:
    149
    J. Muenchbourg
    Aug 9, 2003
  5. Matt
    Replies:
    11
    Views:
    408
    Aaron Bertrand [MVP]
    Nov 8, 2003
Loading...

Share This Page