is there a way to remove the time on the calendar?

liunx

Guest
hi guys long time no c...erm...recenty i encountered a problem...it is considering the calendar's function. i enable my user to select a date from my calendar and i display it on the next webform using datagrid. but that is where the problem start. on the requested date session , there is the requested date and together with it is the time showing 12:00:00 AM? can any1 help me in removing the time away? thank...by the way, i'm using the platform .Net, the language is VB. thank...can some one pls help?? pls solve me or at lwast offer any advice that would be helpful to me ok? pleaseWhen working with date data type you can format it the way you want it.

For example, in your calendar SelectionChanged event you can do this:

Private Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
Label1.Text = Calendar1.SelectedDate.ToShortDateString
End Sub

If you use the ToShortDateString formating you get only the date without the time in the format 1/13/2005. If you use ToLongDateString your date will look like this: Thursday, January 13, 2005.

Good Luck!it would be helpful if we know the problem ;)it is another issue i posted...another issue post abt the calendar how to remove the timethreads merged.
 
Back
Top