title: how to output date and time from powershell to a file
body: <p>I can get current date and time in yyyy/mm/dd format in powershell. I want the output of this cmd to be put in text file.</p>
  
  <p>Currently Command I run is </p>
  
  <pre><code>get-date -format yyyy/mm/dd
  </code></pre>
  
  <p>Works as expected but I when I try to redirect output to file I see error</p>
  
  <pre><code>get-date -format yyyy/mm/dd - o test.txt
  </code></pre>
  
  <p>The question might be trivial as I am new to powershell</p>