title: Is there a better way to trim a DateTime to a specific precision?
body: <p>What's the best way to trim a DateTime object to a specific precision?  For instance, if I have a DateTime with a value of '2008-09-29 09:41:43', but I only want it's precision to be to the minute, is there any better way to do it than this?</p>
  
  <pre><code>private static DateTime TrimDateToMinute(DateTime date)
  {
      return new DateTime(
          date.Year, 
          date.Month, 
          date.Day, 
          date.Hour, 
          date.Minute, 
          0);
  }
  </code></pre>
  
  <p>What I would really want is to make it variable so that I could set its precision to the second, minute, hour, or day.</p>