473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Value Of DatetimePicker Not Changes With System Date

maheshwag
I have a datetimepciker and set the time as below:
Expand|Select|Wrap|Line Numbers
  1. dateTimePicker1.Format = DateTimePickerFormat.Custom;
  2. dateTimePicker1.CustomFormat = "hh:mm:tt";
  3.  
  4.  
But it's not changes it's time with system time. it's just showing time like sticky it's value is not changing with system time.

how to set it with keeping changes time with system time?.
Oct 5 '11 #1

✓ answered by arie

Sorry, I ment Form_Load event (to initialize the Value), my mistake :(

As far as I understand it (here http://msdn.microsoft.com/en-us/library/xdtd4tst.aspx is my source of "understanding")you have to update the Value yourself if you want it changing with system time. I think you may use a Timer, or datetimepicker_Enter event (there is one, I checked properly this time :)), because it won't change on its own after it's created.

3 3621
arie
64
Did you assign
Expand|Select|Wrap|Line Numbers
  1. dateTimePicker1.Value
somewhere? If not, try to do it in dateTimePicker1 Load event. Maybe your CustomFormat is interferring somehow?
Oct 5 '11 #2
arie,

sorry but there is no datetimepicker_load event at system. and I think the value already assigned by custom but problem is that it is not keep changes with system.
Oct 6 '11 #3
arie
64
Sorry, I ment Form_Load event (to initialize the Value), my mistake :(

As far as I understand it (here http://msdn.microsoft.com/en-us/library/xdtd4tst.aspx is my source of "understanding")you have to update the Value yourself if you want it changing with system time. I think you may use a Timer, or datetimepicker_Enter event (there is one, I checked properly this time :)), because it won't change on its own after it's created.
Oct 6 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Robert Bravery | last post by:
HI all, I am new to .net and c#. How can I change the system date based on user input on an textbox on a form Thanks Robert
0
by: Ably+ | last post by:
Hi, I have use following code in order to avoid system changes by user: void OnTimeChanged(object sender, EventArgs e) { // Time has changed string message =...
3
by: seegoon | last post by:
Hi to all. I have a small problem I hope someone can help me with. I am running a sql query to a csv file. The query searches for the total of a column between 2 dates. This is a copy of one of...
11
by: Mike9900 | last post by:
How can I get the real system date/time if the user fakes the date, for example by setting the system date back. -- Mike
14
by: tvmadarsh | last post by:
hai i am a System Administrator in a company. my most of the PCs system date when starting changes automatically to the year 2005. it is big problem for me now please any one help me to solve...
4
by: anagai | last post by:
I just want to check if a date entered in a textbox is equal to the current system date. I set the date object from the input field like this: dt1=new Date('10/01/2007'); the current system...
2
by: Louverril | last post by:
I have a problem I just can't get any sort of query findfirst or the sql below to correctly compare a value in a table with a supplied value. I created a very simple situation to try and figure ...
2
by: kkshansid | last post by:
i want to know how to change date formate in visual basic project from control panel???? from mm/dd/yyyy to dd/mm/yyyy in vb calender control
0
by: kkshansid | last post by:
i know about formate function but i want to confirm that if it has anything to do with system date time in controll panel such that dd/mm/yyyy when i formate system it changes to mm/dd/yyyy...
2
by: samvb | last post by:
Hi, I have just finished a program that uses ms access and depends on system date to do certain things. just when i was testing it, a friend suggested that i change system date to see how it reacts....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.