Newtonsoft JsonConvert datetime format as JavascriptSerializer
问题 I'm using .NET Core and want to serialize a date into the same format as the System.Web.Script.JavascriptSerializer, but using Newtonsoft jsonconverter instead (or something else compatible with .NET Core since the JavascriptSerializer is .NET framework). Example: DateTime result1; var dt1 = DateTime.TryParse("12.06.2012 10:34:00",CultureInfo.GetCultureInfo("DA-dk"), DateTimeStyles.None, out result1); JsonConvert.Serialize(result1); This does NOT return a format like this that I need: "/Date