Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to set time with date on form load now problem is when i see the value of datetimepicker
value is date+time(Current Time) here i want to change value of datetime as date+(from midnight 12 AM ) and not from current time
Posted

1 solution

Try:
C#
myDateTimePicker.Value = DateTime.Now.Date;

http://msdn.microsoft.com/en-us/library/system.datetime.date(v=vs.110).aspx[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900