title: Oracle TO_DATE() function
body: <p>I am trying to insert date into an oracle database which is imported from an excel spreadsheet. At some rows of spreadsheet, the date is represented in 24 hour format and at some rows it is represented in AM/PM format.</p>
  
  <p>I started converting the date string to oracle format by using TO_DATE function as </p>
  
  <pre><code>"TO_DATE(\'" + Timestamp + "\', 'MM/DD/YYYY HH:MI:SS AM', 'nls_date_language=american')"
  </code></pre>
  
  <p>The "Timestamp" here is a C# string variable which has date in string format. </p>
  
  <p>I am getting exception when the timestamp variable is represented in 24 hour format. Is there any way that I can make my C# code accept both type of date formats and insert into oracle table as they are?</p>