Hello CodeProject,
I`m migrating access database to vb.net.
I have employee database with a few DateTimePickers, textboxes, and comboboxes.
In access I have formulas in textbox's control source like this, and it works:
txtDayCalculation
=DateDiff("d",txtDateofHire, txtManualDate)
txtYear
=Int(txtDayCalculation/365)
txtMonth
=Int((txtDayCalculation-(txtYear*365))/30)
txtDay
=((txtDayCalculation-txtYear*365))-(txtMonth*30)
So, I have trying to do also in vb.net, but NOT successful.
Maybe my approach to write a code is wrong.
Anyway, I have code like this:
me.txtDayCalculation.text = DateDiff("d",txtDateOfHireDateTimePicker, txtManualDateDateTimePicker)
Please someone to check code, and give me corrections.
Thank you in advance for help to anyone