That is a lot harder than it looks - you have to presumably cope with any date format - I can think of three which could confuse you:
yyyy/MM/dd
dd/mm/yy
mm/dd/yy
If he enters "11/12/13" which is the year? Which is the month?
If he enters "11/12/2013" is that 11th Dec or 12th Nov?
What if he enters 1/2 - is that a half, or 1st Feb next year?
What if he enters Dec 12 2011?
If you can, try to change your UI so that dates are entered in a calendar control instead - it is a lot easier for you, and could be a lot clearer for the user too.