title: VBS objFile.DateLastModified and Date Format Settings
body: <p>I'm trying to do some date modify check for a file in my VBS script. But it looks like comparison operation depend on date format which set on machine where script is runnnig. I have diverse machines where Regioanal &amp; date settings could be Russian, English US, English UK and I need to run my VBS against all machines and being able to compare date correctly.</p>
  
  <p>When I'm trying to use</p>
  
  <pre><code>If objFile.DateLastModified = cdate("19.10.2012 11:34:06") then 
  do something
  Else do something else
  End IF
  </code></pre>
  
  <p>It seemingly works and doing correct comparison on machine with Russian formats setting, but fails on machine with English UK formats setting with following error</p>
  
  <pre><code>Type mismatch: 'cdate'
  800A000D
  </code></pre>
  
  <p>If I use <code>following DateSerial(2012,10,19)</code> it doesn't throw an error but fail to compare dates correctly.</p>
  
  <p>What is the best and easiest way to compare file modify date against predifined value with VBS irrespectively of machine date format setting?</p>