Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two datetimepicker in two windows form. if i select date in datetimepicker in first form the second datetimepicker in second form display 6 month date after date select in datetimepicker in first form.it display 6 month differnce. how can i do that?
Posted

1 solution

You need to add 6 months to the date of first picker. You can do either way mentioned below.

Following would help you:
MSDN: DateTime.AddMonths Method [^]

OR

MSDN: DateTime.Add Method [^]
MSDN: TimeSpan Structure[^]
 
Share this answer
 
Comments
Manohar Khillare 8-Aug-12 10:53am    
i have two forms and each form contain one datetimepicker
Sandeep Mewara 8-Aug-12 11:41am    
So? Whenever you go from one form to other take the value and use it!

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