Actually I already knew about Calendar but I couldn't get the right results. That's why I was looking for the algorithm rajatC posted. The funny thing is that yesterday Calendar wasn't giving me the right results but today for some strange reason the code that I wrote worked. That's why I try to avoid Calendar and work only with Date and SimpleDateFormat. I find it simpler.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...