title: How to get correct timestamp in C#
body: <p>I would like to get valid timestamp in my application so I wrote:</p>
  
  <pre><code>public static String GetTimestamp(DateTime value)
  {
      return value.ToString("yyyyMMddHHmmssffff");
  }
  //  ...later on in the code
  String timeStamp = GetTimestamp(new DateTime());
  Console.WriteLine(timeStamp);
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>000101010000000000
  </code></pre>
  
  <p>I wanted something like:</p>
  
  <pre><code>20140112180244
  </code></pre>
  
  <p>What have I done wrong?</p>