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 successfull. Maybe my aproach to write a code is wrong.
Anyway, I have write 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.