I have a generic Api in Rest service which get a datatable that was filled from sql table and return it as Json using stream. part of the fields in my table includes date in yyyy-MM-dd HH:mm:ss format,all the values that has a valid sql date,return with Epoch date time representation. how can I solve it? see code:
System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
string t = serializer.Serialize(dataTableFromSQL);
WebOperationContext.Current.OutgoingResponse.ContentType = "application/json; charset=utf-8";
MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(t));
return ms;