Welcome Guest Search | Active Topics | Sign In | Register

getting week from selected date on calendar Options
phil dude
Posted: Monday, January 4, 2010 5:38:35 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2010
Posts: 4
Hi!
I tried searching the forums but couldn't find what I was looking for. I probably don't ask the right questions though...

I'm trying to find out what week the selected date is on a calendar. Basically the user has certain things to do certain weeks and those things are the same for that whole week. I know how to show the weeks next to the dates on the calendar but I don't know how to extract it. I can get the date, but do I need to write my own function to determine what week it is?

Any suggestions or help is highly appreciated!
eo_support
Posted: Monday, January 4, 2010 8:14:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

That has nothing to do with the Calendar. You get a System.DateTime object from the Calendar and then get everything else from that DateTime object. For example, you can get day of week through DateTime.DayOfWeek proeprty.

I am not exactly sure what you mean by getting the week --- whether you want to get the first day of the week, or want to get the number of weeks since the begin of the year, or something else. In any case the question would be getting week from a DateTime value, not from the Calendar.

Thanks!
phil dude
Posted: Monday, January 4, 2010 8:18:00 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2010
Posts: 4
Thank you for pointing me in the right direction. What I want to get is the number of the week since the beginning of the year. I'm not sure if that is included in the system.datetime object. Thank you for your quick reply, this forum has a nice answer rate it seems.
eo_support
Posted: Monday, January 4, 2010 8:40:17 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
phil dude wrote:
this forum has a nice answer rate it seems.

Thanks. But we only support questions that are directly related to our product. For questions like week from DateTime we usually don't mind to point you to the right direction, but it is actually not within the scope of our support. So you may want to search online for that. Sorry about it!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.