I am fetching datetime from SQL Server using Entity Framework. The format in my database is 2013-01-01 00:00:00.000
where as when I get it via Entity Framework in JSON format, it is "\\/Date(1356980400000+0500)\\/"
.
Here is my code
public class SurveyData
{
[DataMember]
public DateTime? CreatedDate { get; set; }
}
var surveyDataList = (from survey in context.FDT_SURVEY
where survey.Name == surveyName
select new SurveyData
{
SurveyID = SqlFunctions.StringConvert((double)survey.SURVEY_ID).Trim(),
CreatedDate = survey.CREATED_DATE,
}
);
in my database, the datatype of CREATED_DATE
is datetime
.
Unable to understand what is the issue. Any help !