How to get future date with datepicker

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jasminlighthous
    New Member
    • Jul 2012
    • 1

    How to get future date with datepicker

    in my project of hotelmanagment. .for room issue date i have used date picker, it will automatically take present date.., for how many days a customer staying i kept a text box and enter no of days staying .my probem is how i got due date in another date time picker.when i enter the duration of days and that date must be shown.i need code for this in c#..plz help me..
    for ex..my issue date is 31-03-2012 no of days staying 3 my due date must be 3-04-2012.
  • lyodmichael
    New Member
    • Jul 2012
    • 75

    #2
    are you using 2 date time picker or just 1? if you using date time picker for just picking up the staying day hmm, why you just minus the day to day to the number of day the customer will staying. us
    Code:
    date.now
    for the day.

    i get the logic but im not good in c#, sorry

    #tip

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Use the .AddDays method.

      Comment

      Working...