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)
130this = new SqlDateTime(dayticks, timeticks); 187this = new SqlDateTime(day, time); 249return new SqlDateTime(day, time); 323return new SqlDateTime(value); 358return new SqlDateTime(dt); 677public static readonly SqlDateTime MinValue = new SqlDateTime(s_minDay, 0); 678public static readonly SqlDateTime MaxValue = new SqlDateTime(s_maxDay, s_maxTime); 680public 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); 136SqlDateTime newValue = default; 146return ((SqlDateTime)tmp); 153Debug.Assert((value.GetType() == typeof(SqlDateTime)), "wrong input type"); 166return new SqlDateTime[recordCount]; 171SqlDateTime[] typedStore = (SqlDateTime[])store; 178_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)
24public struct SqlDateTime : INullable, IComparable, IXmlSerializable, IEquatable<SqlDateTime> 196private static TimeSpan ToTimeSpan(SqlDateTime value) 203private static DateTime ToDateTime(SqlDateTime value) 223private static SqlDateTime FromTimeSpan(TimeSpan value) 252private static SqlDateTime FromDateTime(DateTime value) 262return SqlDateTime.MaxValue; 321public static implicit operator SqlDateTime(DateTime value) 327public static explicit operator DateTime(SqlDateTime x) 341public static SqlDateTime Parse(string s) 346return SqlDateTime.Null; 367public static SqlDateTime operator +(SqlDateTime x, TimeSpan t) 373public static SqlDateTime operator -(SqlDateTime x, TimeSpan t) 383public static SqlDateTime Add(SqlDateTime x, TimeSpan t) 389public static SqlDateTime Subtract(SqlDateTime x, TimeSpan t) 472public static explicit operator SqlDateTime(SqlString x) 474return x.IsNull ? SqlDateTime.Null : SqlDateTime.Parse(x.Value); 505public static SqlBoolean operator ==(SqlDateTime x, SqlDateTime y) 510public static SqlBoolean operator !=(SqlDateTime x, SqlDateTime y) 515public static SqlBoolean operator <(SqlDateTime x, SqlDateTime y) 521public static SqlBoolean operator >(SqlDateTime x, SqlDateTime y) 527public static SqlBoolean operator <=(SqlDateTime x, SqlDateTime y) 533public static SqlBoolean operator >=(SqlDateTime x, SqlDateTime y) 544public static SqlBoolean Equals(SqlDateTime x, SqlDateTime y) 550public static SqlBoolean NotEquals(SqlDateTime x, SqlDateTime y) 556public static SqlBoolean LessThan(SqlDateTime x, SqlDateTime y) 562public static SqlBoolean GreaterThan(SqlDateTime x, SqlDateTime y) 568public static SqlBoolean LessThanOrEqual(SqlDateTime x, SqlDateTime y) 574public static SqlBoolean GreaterThanOrEqual(SqlDateTime x, SqlDateTime y) 595if (value is SqlDateTime i) 599throw ADP.WrongType(value!.GetType(), typeof(SqlDateTime)); 602public int CompareTo(SqlDateTime value) 618value is SqlDateTime other && Equals(other); 623public bool Equals(SqlDateTime other) => 653SqlDateTime st = FromDateTime(dt); 677public static readonly SqlDateTime MinValue = new SqlDateTime(s_minDay, 0); 678public static readonly SqlDateTime MaxValue = new SqlDateTime(s_maxDay, s_maxTime); 680public 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))