title: check if date time string contains time
body: <p>I have run into an issue. I'm obtaining a date time string from the database and and some of these date time strings does not contain time. But as for the new requirement every date time string should contain the time like so,</p>
  
  <p>1)<code>1980/10/11 12:00:01</code>
  2)<code>2010/APRIL/02 17:10:00</code>
  3)<code>10/02/10 03:30:34</code></p>
  
  <p>Date can be in any format followed by the time in <code>24hr</code> notation.</p>
  
  <p>I tried to detect the existence of time  via the following code,</p>
  
  <pre><code>string timestamp_string = "2013/04/08 17:30";
  DateTime timestamp = Convert.ToDateTime(timestamp_string);
  string time ="";
  
  if (timestamp_string.Length &gt; 10)
  {
      time = timestamp.ToString("hh:mm");
  }
  else {
      time = "Time not registered";
  }
  
  MessageBox.Show(time);
  </code></pre>
  
  <p>But this only works for the No <code>1)</code> type timestamps. May I please know how to achieve this task on how to detect if the time element exist in this date time string. Thank you very much :)</p>
  
  <p><strong>POSSIBLE MATCH</strong>
  <a href="https://stackoverflow.com/questions/7420399/how-to-validate-if-a-date-and-time-string-only-has-a-time">How to validate if a &quot;date and time&quot; string only has a time?</a></p>
  
  <p><strong>INFO</strong> the three answers provided by <code>Arun Selva Kumar</code>,<code>Guru Kara</code>,<code>Patipol Paripoonnanonda</code> are all correct and checks for the time and serves my purpose. But I select <code>Guru Kara</code>s answer solely on ease of use and for the explanation he has given. Thank you very much :) very much appreciated all of you :)</p>