-
Jul 22nd, 2014, 04:24 AM
#1
Thread Starter
New Member
[RESOLVED] add one month to a datepicker
i have a form in visual basic 2010
it contains 2 datepicker
the first one is the recharge date so i will choose the date
the second one is the expiry date so it will add automatically one month
(seconddatepicker = firstdatepicker + one month)
in the previous version of my app it was maded in access 2013
i put in the textbox control source (=DateAdd("m";1;[txt_Recharge_Date]))
but i can't use it in vb
any help please ??
-
Jul 22nd, 2014, 04:51 AM
#2
Hyperactive Member
Re: add one month to a datepicker
Try this:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DateTimePicker2.Value = DateTimePicker1.Value.AddMonths(1)
End Sub
Last edited by hamza.saleem; Jul 22nd, 2014 at 05:00 AM.
-
Jul 22nd, 2014, 07:18 AM
#3
Thread Starter
New Member
Re: add one month to a datepicker
thank you hamza it works fine
-
Jul 31st, 2019, 04:51 AM
#4
New Member
Re: [RESOLVED] add one month to a datepicker
i have a form in visual basic 2010 it contains 2 datepicker the first one is the recharge date so i will choose the date the second one is the expiry date so it will add automatically one month (seconddatepicker = firstdatepicker + text box value) it was not working in visual studio 2010 help me)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|