Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to retrieve the data based on sku number like in below code,in this process i got all data same as it is in database but "date type" value is display like "01/01/0001".But i need to "date type" data like as it is in database date.any modifications i need to do .please help me out.
public IEnumerable<SKUDvo> getdatabysku()

         eshop_dbContext dbcontext123 = new eshop_dbContext();

         var productinfoQuery321 = (from productInfo321 in dbcontext123.ProductMasters
                                    where 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 is like below.
empid ename dateofjoin

10  sarath 26/02/2003

20  jai    16/03/2001

my result is like below

10 sarath 01/01/0001
20 jai 01/01/0001
Updated 4-Sep-13 0:40am
TryAndSucceed 4-Sep-13 17:39pm    
Are you retrieving the data from the table given? and is its name ProductInfo321?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900