9 instantiations of SqlDateTime
System.Data.Common (9)
System\Data\Common\SQLConvert.cs (1)
579return new SqlDateTime(XmlConvert.ToDateTime((string)value, XmlDateTimeSerializationMode.RoundtripKind));
System\Data\SQLTypes\SQLDateTime.cs (8)
142this = new SqlDateTime(dayticks, timeticks); 199this = new SqlDateTime(day, time); 261return new SqlDateTime(day, time); 335return new SqlDateTime(value); 370return new SqlDateTime(dt); 693public static readonly SqlDateTime MinValue = new SqlDateTime(MinDay, 0); 694public static readonly SqlDateTime MaxValue = new SqlDateTime(MaxDay, MaxTime); 696public static readonly SqlDateTime Null = new SqlDateTime(true);
95 references to SqlDateTime
netstandard (1)
netstandard.cs (1)
579[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlDateTime))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
235[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlDateTime))]
System.Data.Common (93)
System\Data\ColumnTypeConverter.cs (1)
48typeof(SqlDateTime),
System\Data\Common\DataStorage.cs (1)
100typeof(SqlDateTime),
System\Data\Common\SQLConvert.cs (5)
221public static SqlDateTime ConvertToSqlDateTime(object value) 226return SqlDateTime.Null; 233StorageType.SqlDateTime => (SqlDateTime)value, 235_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlDateTime)), 667return XmlConvert.ToString(((SqlDateTime)value).Value, XmlDateTimeSerializationMode.RoundtripKind);
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (19)
16private SqlDateTime[] _values = default!; // Late-initialized 19: base(column, typeof(SqlDateTime), SqlDateTime.Null, SqlDateTime.Null, StorageType.SqlDateTime) 31SqlDateTime min = SqlDateTime.MaxValue; 37if ((SqlDateTime.LessThan(_values[record], min)).IsTrue) 48SqlDateTime max = SqlDateTime.MinValue; 54if ((SqlDateTime.GreaterThan(_values[record], max)).IsTrue) 83throw ExprException.Overflow(typeof(SqlDateTime)); 96return _values[recordNo].CompareTo((SqlDateTime)value); 137SqlDateTime newValue = default; 147return ((SqlDateTime)tmp); 155Debug.Assert((value.GetType() == typeof(SqlDateTime)), "wrong input type"); 168return new SqlDateTime[recordCount]; 173SqlDateTime[] typedStore = (SqlDateTime[])store; 180_values = (SqlDateTime[])store;
System\Data\Filter\BinaryNode.cs (8)
485if (vLeft is TimeSpan && vRight is SqlDateTime) 487SqlDateTime rValue = SqlConvert.ConvertToSqlDateTime(vRight); 490else if (vLeft is SqlDateTime && vRight is TimeSpan) 492SqlDateTime lValue = SqlConvert.ConvertToSqlDateTime(vLeft); 624if (vLeft is TimeSpan && vRight is SqlDateTime) 626SqlDateTime rValue = SqlConvert.ConvertToSqlDateTime(vRight); 629else if (vLeft is SqlDateTime && vRight is TimeSpan) 631SqlDateTime lValue = SqlConvert.ConvertToSqlDateTime(vLeft);
System\Data\SQLTypes\SQLDateTime.cs (54)
25public struct SqlDateTime : INullable, IComparable, IXmlSerializable, IEquatable<SqlDateTime> 208private static TimeSpan ToTimeSpan(SqlDateTime value) 215private static DateTime ToDateTime(SqlDateTime value) 235private static SqlDateTime FromTimeSpan(TimeSpan value) 264private static SqlDateTime FromDateTime(DateTime value) 274return SqlDateTime.MaxValue; 333public static implicit operator SqlDateTime(DateTime value) 339public static explicit operator DateTime(SqlDateTime x) 353public static SqlDateTime Parse(string s) 358return SqlDateTime.Null; 379public static SqlDateTime operator +(SqlDateTime x, TimeSpan t) 385public static SqlDateTime operator -(SqlDateTime x, TimeSpan t) 395public static SqlDateTime Add(SqlDateTime x, TimeSpan t) 401public static SqlDateTime Subtract(SqlDateTime x, TimeSpan t) 484public static explicit operator SqlDateTime(SqlString x) 486return x.IsNull ? SqlDateTime.Null : SqlDateTime.Parse(x.Value); 517public static SqlBoolean operator ==(SqlDateTime x, SqlDateTime y) 522public static SqlBoolean operator !=(SqlDateTime x, SqlDateTime y) 527public static SqlBoolean operator <(SqlDateTime x, SqlDateTime y) 533public static SqlBoolean operator >(SqlDateTime x, SqlDateTime y) 539public static SqlBoolean operator <=(SqlDateTime x, SqlDateTime y) 545public static SqlBoolean operator >=(SqlDateTime x, SqlDateTime y) 556public static SqlBoolean Equals(SqlDateTime x, SqlDateTime y) 562public static SqlBoolean NotEquals(SqlDateTime x, SqlDateTime y) 568public static SqlBoolean LessThan(SqlDateTime x, SqlDateTime y) 574public static SqlBoolean GreaterThan(SqlDateTime x, SqlDateTime y) 580public static SqlBoolean LessThanOrEqual(SqlDateTime x, SqlDateTime y) 586public static SqlBoolean GreaterThanOrEqual(SqlDateTime x, SqlDateTime y) 607if (value is SqlDateTime i) 611throw ADP.WrongType(value!.GetType(), typeof(SqlDateTime)); 614public int CompareTo(SqlDateTime value) 630value is SqlDateTime other && Equals(other); 635public bool Equals(SqlDateTime other) => 665SqlDateTime st = FromDateTime(dt); 693public static readonly SqlDateTime MinValue = new SqlDateTime(MinDay, 0); 694public static readonly SqlDateTime MaxValue = new SqlDateTime(MaxDay, MaxTime); 696public static readonly SqlDateTime Null = new SqlDateTime(true);
System\Data\SQLTypes\SQLString.cs (3)
512public static explicit operator SqlString(SqlDateTime x) 628public SqlDateTime ToSqlDateTime() 630return (SqlDateTime)this;
System\Data\TypeLimiter.cs (1)
156typeof(SqlDateTime),
System\Data\xmlsaver.cs (1)
235if (type == typeof(DateTime) || type == typeof(SqlDateTime))