hi,

1-how can i do multiselect in calendar.
2-how many days between 2 dates? how can u calculate it?
example :
10/10/2006 - 12/10/2006 there is 1 day between those 2 dates.

thanks

1-how can i do multiselect in calendar.
thanks

Select Calendar control and set SelectionMode property to DayWeek or DayWeekMonth.

2-how many days between 2 dates? how can u calculate it?
example :
10/10/2006 - 12/10/2006 there is 1 day between those 2 dates.
thanks

You can use DateDiff function Here is the sample:

DateDiff(DateInterval.Day, MyFirstDate, MyLastDate)[B]-1[/B]

If you need to count days in Caledar control than simply add this in SelectionChanged event od the Calendar control:

Me.Calendar1.SelectedDates.Count

Hope it helps.

Hi ManicCW,

Thank you very much for your help. they work very well.

Kind regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.