Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey huys
actually i am doing a library management system , every thing is alright but i want to set the receiving date to be filled automatically with respect to the issue date so please help me
Posted
Comments
Mahendra.p25 7-Apr-11 6:43am    
please elaborate

1 solution

If I wanted to add 10 days onto todays date, then this is how you could do it.

C#
dateTimePicker1.Value = DateTime.Now.AddDays(10);


or you can set it with a New DateTime

C#
dateTimePicker1.Value = new DateTime(2012,4,7);
 
Share this answer
 
Comments
SwitcherSoft 7-Apr-11 6:46am    
yes

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