public class Employees{ public int Id {get;set;} public string Name {get;set;} public DateTime StartTime {get;set;} public DateTime FinishTime {get;set;} }
public class TimeController: ApiController { [Route("api/getuserhours")] [HttpGet] public IEnumerable<Employees> GetDefaultTime() { var getEmp = context.Employees.Where(x => x.Name == currentUser).ToList(); // now this is where i'm stuck .. i just want my model StartTime and //FinishTime in particular to only return the time only not date. so how would i //access the getEmp here and change the datetime to return the time only . return getEmp; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)