title: Is there any easy way to get 2 days ago date using batch scripting CDM?
body: <p>I am trying to change the code in order to get two days ago date using the batch file. In this example, I can take today date</p>
  
  <pre><code>for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set datetime=%%I
  set LogDateTime=%datetime:~0,8%_%datetime:~8,6%
  </code></pre>
  
  <p>However, I don't know how to modify the code to get two days ago data. I am not looking for PowerShell, and not any other solution. We have to use only the batch.</p>