title: Parse datetime in multiple formats
body: <p>I have created an API end-point. The caller may call the API with <code>POST</code> method passing the relevant parameters. In the parameters there is one parameter that is of <code>datetime</code> format.</p>
  
  <p>The problem is that when calling this API the caller may passes <code>datetime</code> in 3 different formats:</p>
  
  <ol>
  <li><code>long int</code> - e.g. 1374755180</li>
  <li>US format - e.g. "7/25/2013 6:37:31 PM" (as <code>string</code>)</li>
  <li>Timestamp format - e.g. "2013-07-25 14:26:00" (as <code>string</code>)</li>
  </ol>
  
  <p>I have to parse the <code>datetime</code> value and convert it to a <code>DateTime</code> or <code>string</code> in Timestamp format.</p>
  
  <p>I have tried using <code>DateTime.TryParse()</code>, <code>DateTime.Parse()</code>, <code>Convert.ToDateTime()</code> and <code>Convert.ToDouble()</code> but none of them are working in certainty for me.</p>
  
  <p>The required output has to be in <code>en-GB</code> format.</p>
  
  <h2>Edit:</h2>
  
  <p>I had thought to have an <code>if-else if-else</code> block to use with <code>TryParse</code> 3 times with one <code>else</code> to say the string could not be parsed. Is this the best solution? Or are there solutions better than this?</p>
  
  <p>Please help!</p>