title: MS-Access: How to convert a text string in MM/DD/YYYY format to proper date in MS-Access?
body: <p>I have a MS-Access database table (with Candidate Data of a School) with few hundred records, with the Candidate's Date of Birth saved as a text string, STRICTLY in "mm/dd/yyyy" format. </p>
  
  <p>Now I want a query to retrieve the values,  while converting the text string values to Date type, so that it can be sorted (in desc or asc order of date, when needed) to find out the eldest candidate in the query result. </p>
  
  <p>I discovered to my utter dispair that, the string "01/11/2003" is converted to date "01-Nov-2003" (It should have been 11-Jan-2003) but the string "11/15/2002" is converted to date "15-Nov-2002". </p>
  
  <p>In the process, I tried the following strategies, all resulting in the same outcome:</p>
  
  <ol>
  <li>Using custom VBA function ConvertMyStringToDateTime as suggested by Gord Thompson</li>
  <li><code>cdate([dob])</code> where dob is the field name that contains the Date of Birth as text String</li>
  <li><code>DateValue([dob])</code> where dob is the field name that contains the Date of Birth as text String</li>
  <li><code>Format([dob],"mm/dd/yyyy")</code> where dob is the field name that contains the Date of Birth as text String</li>
  </ol>
  
  <p>How to force the conversion function to understand that I am always feeding the input text string as "mm/dd/yyyy" format?
  <a href="https://i.stack.imgur.com/GxxKU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GxxKU.png" alt="enter image description here"></a></p>