Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > get the week from the given date

Reply
Thread Tools

get the week from the given date

 
 
Reb
Guest
Posts: n/a
 
      09-25-2003
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
 
Reply With Quote
 
 
 
 
Ravikanth[MVP]
Guest
Posts: n/a
 
      09-25-2003
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
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Days in a given date range for a given month......... Lord0 Java 1 04-19-2006 04:54 PM
Given a date, how to find the beginning date and ending date of that week Matt ASP General 11 11-08-2003 11:24 PM
Given a date, how to find the beginning date and ending date of that week Matt ASP .Net 1 11-08-2003 09:14 PM
Given a date, how to find the beginning date and ending date of that week Matt C Programming 3 11-08-2003 09:07 PM
Given a date, how to find the beginning date and ending date of that week Matt C++ 2 11-08-2003 08:30 PM



Advertisments