1.NewTonSoft.json

 public static string DataTableToJson(DataTable dt)
        {
            if (dt == null && dt.Rows.Count <= 0)
            {
                return "";
            }
            else
            {
                IsoDateTimeConverter convert = new IsoDateTimeConverter();
                convert.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
                return JsonConvert.SerializeObject(dt, Formatting.None, convert);

            }
              
        }
View Code

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2021-12-22
  • 2021-12-22
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-22
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案