Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET SQL C#4.0 Server
Hi,
DateTime control of c# winform ,how to give minvalue time;
 
entry time:"00:00:00";
exit time :"00:00:00";
 
how to write code.
 
txtdate.text=null;
txtdate.text=string.empty;
 
not working if any other way.
 
thanks,
karthikeyan,
Bangalore.
Posted 8-Oct-12 23:58pm
Edited 9-Oct-12 0:02am
v2
Comments
vivektiwari97701 at 9-Oct-12 6:42am
   
You Are Talking About DTPicker And Writing code for Txt Box for DTpicker Value Is Property To Set Date Time.or U just Explane ur Qus. ....
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try this
 txtdate.Text = System.DateTime.MinValue.ToString("hh:mm:ss");
  Permalink  
Comments
pkarthionline at 9-Oct-12 6:26am
   
no.It also not working.
Indiana.Net at 9-Oct-12 6:29am
   
what you need exactly bro???
pkarthionline at 9-Oct-12 6:38am
   
starting date and ending date , I have use DateTimePicker only for time.
 
when I clear the time it not clear, it means set time(00:00:00) .
it show same time only.
 

 
so,how do clear time like this way (00:00:00).or set the time this way(00:00:00)
arshad alam at 9-Oct-12 6:42am
   
do you want to retrieve time from DateTimePicker ? or do you want to set it
pkarthionline at 9-Oct-12 6:46am
   
already I have retrieve it.but now i need clear time for default time for (hh:mm:ss) to set datetimepicker (00:00:00) or txtdate.text="00:00:00";
pkarthionline at 9-Oct-12 6:58am
   
code format of DateTimePicker:
 
this.txtTime.CustomFormat = "HH:mm:ss";
this.txtTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.txtTime.Location = new System.Drawing.Point(174, 218);
this.txtTime.Name = "txtTime";
this.txtTime.ShowUpDown = true;
this.txtTime.Size = new System.Drawing.Size(81, 21);
this.txtTime.TabIndex = 5;
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi,
txtTime.Value = Convert.ToDateTime(txtTime.MinDate);
 
it takes minvalue: 00:00:00
 
thanks friends.
 
Regards,
Karthikeyan,
Bangalore.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100