Groups | Blog | Home
all groups > c# > february 2005 >

c# : Calendar and C#


David Barkol
2/13/2005 1:22:55 PM
You have a type mismatch: this.Calendar1.SelectedDate returns a
DateTime type and Label4.Text expects a string type.

Try:
this.Label4.Text = this.Calendar1.SelectedDate.ToString();

David Barkol
www.neudesic.com
reidarT
2/13/2005 10:09:47 PM
I try to get the selected date from the calendar control to a label with
this:
this.Label4.Text = this.Calendar1.SelectedDate ;

but, I get the mesage Cannot implicitly convert type 'System.DateTime to
string'
regards
reidarT

Peter Jausovec
2/13/2005 10:16:32 PM
Hi,

Calendar1.SelectedDate is a type of System.DateTime .. try
Calendar1.SelectedDate1.ToString ();


--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"reidarT" <reidar@eivon.no> je napisal v sporoèilo
news:Oke0bBhEFHA.2032@tk2msftngp13.phx.gbl ...
[quoted text, click to view]

AddThis Social Bookmark Button