Click here to Skip to main content
12,073,325 members (74,431 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: .NET3.5 .NET
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 7-Aug-12 4:59am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web04 | 2.8.160208.1 | Last Updated 7 Aug 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