This is a migrated thread and some comments may be shown as answers.

Extrating week number

1 Answer 38 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
pallavi
Top achievements
Rank 1
pallavi asked on 07 Nov 2008, 02:13 PM
Hi How can I extraxt week number from telerik rad calendar.If I select a date in the calendar ,then i need to extract the week number for that date from the calendar.Any help is much appreciated

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 07 Nov 2008, 02:46 PM
Hi pallavi,

You can use GetWeekOfYear to determine the week number of the year.  Here is an example:

    protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e) 
    { 
        Response.Write( 
            RadCalendar1.CultureInfo.Calendar.GetWeekOfYear(RadCalendar1.SelectedDate, System.Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday).ToString()); 
    } 


Regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
pallavi
Top achievements
Rank 1
Answers by
Missing User
Share this question
or