title: How to convert datetime to string in linqtosql?
body: <p>I am using linqtosql and inside of linq query, I tried to convert datetime type column to string like 'dd-MM-yy'.
  However, I got error as following :</p>
  
  <blockquote>
    <p>NotSupportedException: Method
    'System.String
    ToString(System.String)' has no
    supported translation to SQL.</p>
  </blockquote>
  
  <p>following is my linq query:</p>
  
  <pre><code>from ffv in Flo_flowsheet_values
  where ffv.Flowsheet_key == 2489
  &amp;&amp; ffv.Variable_key == 70010558
  &amp;&amp; ffv.Status == 'A'
  &amp;&amp; ffv.Column_time &gt;= DateTime.ParseExact("2010-06-13 00:00", "yyyy-MM-dd HH:mm", null)
  &amp;&amp; ffv.Column_time &lt;= DateTime.ParseExact("2010-06-13 22:59", "yyyy-MM-dd HH:mm", null)
  select new  { 
  ColumnTime = ffv.Column_time
  ,ColumnTimeForXCategory = ffv.Column_time.Value.ToString("dd-MM-yy") ***====&gt; this statement invoke error***
  ,BTValue = Convert.ToDouble( ffv.Value) }
  </code></pre>