title: powershell extract a value from a table
body: <p>I'm still pretty new into Powershell and this has taken way too much time, so HELP! (please)</p>
  
  <p>I have a script that starts out by extracting a value from a SQL Server table.  The extract works by populating a "table" via:</p>
  
  <pre><code>$DataSet = New-Object System.Data.DataSet
  $SqlAdapter.Fill($DataSet)
  </code></pre>
  
  <p>Where I run into a problem is getting the single value out of <code>$DataSet</code>. The value is a date time stamp that I need.  Referencing <code>$DataSet.Tables[0]</code> shows me the date time stamp with a heading of Column1.  I've tried all kinds of casting, ToString(), etc.  The results are either a display of data types (e.g. <code>System.Data.DataRow</code>) or any number of errors.  How do I get the value into a variable that is recognized as a date time?</p>
  
  <p>TIA,</p>
  
  <p>John</p>