title: C++ compare to string dates
body: <p>I need to compare 2 string dates to see if one date is later then another. The date format for both dates is at the bottom. i can rearrange this for what ever is easiest. I have boost but it doesn't have to be, ive been through so many examples and can't seem to wrap my brain around getting it to work. Thanks in advance basically i want</p>
  
  <blockquote>
    <p>2012-12-06 14:28:51</p>
  </blockquote>
  
  <pre><code>if (date1 &lt; date2) {
   // do this
  }
  else {
   // do that
  }  
  </code></pre>