Use EntityFunction to truncate the time part from a DateTime String.
grid.DataSource = (from user in context.Users where ISActive = True select new
{
user.UserId,
user.UserName,
FirstName = (user.FirstName + " " + user.LastName),
CreatedDate = System.Data.Objects.EntityFunctions.TruncateTime(user.CreatedDate)
}).ToList();)
grid.DataSource = (from user in context.Users where ISActive = True select new
{
user.UserId,
user.UserName,
FirstName = (user.FirstName + " " + user.LastName),
CreatedDate = System.Data.Objects.EntityFunctions.TruncateTime(user.CreatedDate)
}).ToList();)
No comments:
Post a Comment