none
DateTime in ADO.net 4 RRS feed

  • Question

  • I finally think that there is somethings that not works...

    i have this unresolved problem:

    http://stackoverflow.com/questions/6331187/how-i-can-convert-datetime-variable-in-linq-expression

     

    simply i can't covert/parse/change format for DateTime type filed (even nullable or not...)

    and this is very bad...but maybe i make a big mistake (i hope...)??

     

    Thanks!

    Thursday, September 8, 2011 10:57 AM

Answers

  • Hi maurox1,

    Welcome!

    Try to retrieve the records from database firstly, then convert it.

    var test= from e in db.Employees.ToList() select new {Time= e.Date.ToString()};
    
    
    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, September 9, 2011 9:40 AM
    Moderator

All replies