S sparks9941 Member Licensed User Longtime User Dec 12, 2014 #1 How can I add 1 year to the date that is picked in Another Date Picker and put the result in a label text
How can I add 1 year to the date that is picked in Another Date Picker and put the result in a label text
DonManfred Expert Licensed User Longtime User Dec 12, 2014 #2 Code: Dim per As Period per.Years = 1 newtime = DateUtils.AddPeriod(timefromDatepicker,per) Label1.Text = DateTime.Date(newtime) Upvote 0
Code: Dim per As Period per.Years = 1 newtime = DateUtils.AddPeriod(timefromDatepicker,per) Label1.Text = DateTime.Date(newtime)
S sparks9941 Member Licensed User Longtime User Dec 12, 2014 #3 Thank you, but could you be a little more specific, i am new to this. Do I need to declare newtime as ? (timefromDatepicker,per) is timefromDatepicker anotherdatepicker.getdate? Upvote 0
Thank you, but could you be a little more specific, i am new to this. Do I need to declare newtime as ? (timefromDatepicker,per) is timefromDatepicker anotherdatepicker.getdate?
M Mahares Expert Licensed User Longtime User Dec 12, 2014 #4 Code: Dim per As Period dim newtime as long per.Years = 1 newtime = DateUtils.AddPeriod(anotherdatepicker.getdate,per) Label1.Text = DateTime.Date(newtime) Upvote 0
Code: Dim per As Period dim newtime as long per.Years = 1 newtime = DateUtils.AddPeriod(anotherdatepicker.getdate,per) Label1.Text = DateTime.Date(newtime)
S sparks9941 Member Licensed User Longtime User Dec 12, 2014 #5 Thank you, where would I declare this code. My label just says 12/31/1970 and doesn't change when i select another date from anotherdatepicker Upvote 0
Thank you, where would I declare this code. My label just says 12/31/1970 and doesn't change when i select another date from anotherdatepicker
M Mahares Expert Licensed User Longtime User Dec 13, 2014 #6 Here is a small example that has 3 labels: One label to show picker, one label to add 1 year and a label to hold the final date with the year added. I hope it helps: Attachments DatePicketAddOneYear.zip DatePicketAddOneYear.zip 11.7 KB · Views: 530 Upvote 0
Here is a small example that has 3 labels: One label to show picker, one label to add 1 year and a label to hold the final date with the year added. I hope it helps: