title: C# Linq To Entities Formatted DateTime in IQueryable
body: <p>What I am trying to achieve is get the "FormattedTimeStamp" member variable to contain dates formatted as follows: "12/09/2015 13:00"</p>
  
  <p>What I am getting instead is: "12/9/2015 13:0"</p>
  
  <p>Is there anyway to do this using just plain LINQ to SQL and not propagating to the server (using AsEnumerable(), etc.)?</p>
  
  <p>See below for what I have now which compiles and runs but doesn't give me what I need.</p>
  
  <p>Thank you.</p>
  
  <pre><code>IQueryable&lt;Import_ErrorDTO&gt; dtoErrors = from i in errors
      select new Import_ErrorDTO
    {
        Error_ID = i.Error_ID,
        ErrorDescription = i.ErrorDescription,
        FileName = i.FileName,
        ImportTimeStamp = i.ImportTimeStamp,
        FormattedImportTimeStamp = SqlFunctions.StringConvert((double)SqlFunctions.DatePart("Month", i.ImportTimeStamp)).Trim() + "/" +
                            SqlFunctions.StringConvert((double)SqlFunctions.DatePart("Day", i.ImportTimeStamp)).Trim() + "/" +
                            SqlFunctions.StringConvert((double)SqlFunctions.DatePart("Year", i.ImportTimeStamp)).Trim() + " " +
                            SqlFunctions.StringConvert((double)SqlFunctions.DatePart("hh", i.ImportTimeStamp)).Trim() + ":" +
                            SqlFunctions.StringConvert((double)SqlFunctions.DatePart("mi", i.ImportTimeStamp)),
        Program = i.Program
  };
  </code></pre>