title: Convert a date in a string to FILETIME
body: <p>I have an imput .txt file, which contains a date. The date is in the form DDMONYY, as in 08JUN98 or 16NOV05. I need to compare this date to the creation date of the file, and see which is sooner. </p>
  
  <p>FILETIME seems like the appropriate form, especially since there is a CompareFileTime function. However, I have a problem converting the date into file time.</p>
  
  <p>I can extract the date from the file and convert it into numbers (days 1-31, month 1-12, year 1900-20whatever) so I don't need help with that, but feel free to comment on it anyway.</p>
  
  <p>The real problem is that I can't figure out how to get these values into a FILETIME format. Right now I have them as three different strings(or int's if that helps more) one for day, month and year. If you could help me make the jump from string to FILETIME that would be great.</p>
  
  <p>Or, if there is a completely better way that I missed during my research, please feel free to suggest it. </p>
  
  <p>If you want, I can post what I have, but I don't think it'll help since it's only getting to the string/int's.</p>
  
  <hr>
  
  <p>if it makes it any clearer, the values I have in my variables at this point, for May 3rd, 2002, would be something along the lines of</p>
  
  <pre><code>string day = "03";
  string month ="5";
  string year = "2002;
  int dayint = 3;
  int monthint = 5;
  int yearint = 2002;
  </code></pre>
  
  <p>And I need a way to convert this to a FILETIME</p>
  
  <p>Thanks a bunch.</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>I'm not sure how I would fill a <code>SYSTEMTIME</code> structure, or even how to do it for a different time system. So I guess that is more my question.</p>
  
  <p>I should have also mentioned that I only need accuracy of days. Hours and anything smaller aren't really of concern to me.</p>
  
  <hr>
  
  <p>EDIT2:</p>
  
  <p>I must not have tried giving the <code>SYSTEMTIME</code> int values, because that seems to work. However, I am running into issues when I try to convert that systemtime to a filetime. It states "Error: no suitable converstion from "SYSTEMTIME" to "const SYSTEMTIME *" exists". I'm not sure how to fix this, since if I define the systime variable as <code>const SYSTEMTIME</code> I can't assign values to it.</p>
  
  <p>here's the relevant code, if it helps</p>
  
  <pre><code>SYSTEMTIME systime;
  LPFILETIME ftime1;
  LPFILETIME ftime2;
  int dayint=6;
  int monthint=12;
  int yearint=1989;
  
  systime.wDay = dayint;
  systime.wMonth = monthint;
  //and so on for year, hour, etc. 
  SystemTimeToFileTime(systime,ftime1);     //This is where the aforementioned error occurs
  GetFileTime(filename, NULL, NULL, ftime2);   //I'm also not sure about this line... feel free to critique it. I'm only interested in the last written time so I put NULL for the other times... When I check the values for this (in SYSTEMTIME) it only returns 52428, so I don't think this line is working correctly...
  CompareFileTime(ftime1,ftime2);
  </code></pre>
  
  <p>Of course, the values for day, month, year aren't hardcoded in the actual code.</p>
  
  <hr>
  
  <p>EDIT3:</p>
  
  <p>I have a bad handle....</p>
  
  <p>I'm going to try to fix that....
  Thanks for your help Ben Voigt
  If I can't get it, I guess I'll be back</p>