Click here to Skip to main content
12,449,440 members (61,220 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# 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
Updated 9-Oct-12 0:02am
v2
Comments
vivektiwari97701 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 9-Oct-12 6:26am
   
no.It also not working.
Indiana.Net 9-Oct-12 6:29am
   
what you need exactly bro???
pkarthionline 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 9-Oct-12 6:42am
   
do you want to retrieve time from DateTimePicker ? or do you want to set it
pkarthionline 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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2016
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