linq query issues with date type data -


i want retrieve data based on sku number in below code,in process got data same in database "date type" value display "01/01/0001".but need "date type" data in database date.any modifications need .please me out.

public ienumerable<skudvo> getdatabysku() {      eshop_dbcontext dbcontext123 = new eshop_dbcontext();      var productinfoquery321 = (from productinfo321 in dbcontext123.productmasters                                productinfo321.sku == "s121"                                select productinfo321);      ilist<skudvo> productlist123 = new list<skudvo>();     foreach (var proitems in productinfoquery321)     {         productlist123.add(new skudvo         {             skuno = name,             productid = proitems.productid,             categoryid = proitems.categoryid,             manufaturerid = proitems.manufaturerid,             itemno = proitems.itemno,             productname = proitems.productname,             deletedind = proitems.deletedind,         });     }     return productlist123; } 

my table below.

empid ename dateofjoin 10  sarath 26/02/2003 20  jai    16/03/2001 

my result below

10 sarath 01/01/0001 20 jai    01/01/0001 

it looks have datetime hasn't been set. default value of datetime "01/01/0001 00:00:00".

// outputs value of empty datetime: "01/01/0001 00:00:00" console.writeline(default(datetime)); 

are sure dateofjoin assigned? don't see in code.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -