/// <summary> /// 格式化日期类型 /// </summary> /// <param name="formatstr"></param> /// <param name="obj"></param> /// <returns></returns> public static String FormatDate(String formatstr, String obj) { if (obj.IndexOf("1900") == 0) { return("1900-01-01"); } return(Format(formatstr, Normal.ParseDateTime(obj))); }
/// <summary> /// 格式化日期类型 /// </summary> /// <param name="formatstr"></param> /// <param name="obj"></param> /// <returns></returns> public static String FormatDate(String formatstr, object obj) { DateTime obj1 = Normal.ParseDateTime(obj); return(FormatDate(formatstr, obj1)); }