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