public void Method() { Print.WriteLine("SqlTypes SqlDateTime.MinValue"); Print.WriteLine(SqlDateTime.MinValue.Value.ToString()); Print.WriteLine("SqlTypes SqlDateTime.MaxValue"); Print.WriteLine(SqlDateTime.MaxValue.Value.ToString()); Print.WriteLine("new SqlDateTime(DateTime.MinValue)"); Print.WriteLine(ConvertTool.ObjToSqlDateTime(DateTime.Now.ToString(), SqlDateTime.MaxValue).ToString()); }
public override object InputConvert(object sourceValue, ColumnItemModel colmodel) { SqlDateTime result = _defalutValue; result = ConvertTool.ObjToSqlDateTime(sourceValue, _defalutValue); if (result == _defalutValue) { return(GetDefaultValueString()); } return(result.Value.ToString(Names.TABLE_DATETIME_FORMAT_MILLISECOND)); }