title: Store the formatted date value to an environment variable for command line
body: <p>I am trying to store the formatted date value to an environment variable. Below is my batch script. </p>
  
  <pre><code>set now="`powershell get-date -format \"{yyyy-mm-dd}\"`"
  
  dsjob -run -jobstatus -param current_timestamp=%now% dstage1 TheAge
  </code></pre>
  
  <p>This is not working. I am a Unix guy and I expect an easier way of doing this than using for loops and other solutions provided.</p>
  
  <p>How to store the executed command value to an environment variable?</p>