Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

monthCalendar control

Status
Not open for further replies.
Aug 1, 2005
25
0
0
US
How do you grab a selected date from this control thingy???

Its like tooth extraction I bet

4 C# Window app example

Thanks!!!

Oh if every language can be like VB?!
 
VB sucks. :)

use dateTimePicker1.value;

you may need to convert it to date time.

Convert.ToDateTime(dateTimePicker1.value);
 
Thanks JM

But need for monthCalendar control not datetimepicker

There is .VALUE for monthCalendar control, selectedDate doesn't work???

hmmmm...

Help!!! Argh!

Also any way to do datediff function with vb import?

Thanks again.

:)
 
Sorry about that.

I believe you use TodayDate (the date selected) or you can pull from the date selection range.

DateTime.Compare(dt1,dt2); works quite well.
 
the monthCalander has a SelectionStart. Is that what you're looking for.

You can make a reference to Microsoft.VisualBasic and the add using Microsoft.VisualBasic to the top of your class to get all the VB Functions in your app.

 
did you try this?
Dim returnValue As String
returnValue = monthCalendar1.Text
 
sorry c# is this

string returnValue ;
returnValue = monthCalendar1.Text;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top