MySqlDateTime structure
Represents a MySQL date/time value. This type can be used to store DATETIME
values such as 0000-00-00
that can be stored in MySQL (when AllowZeroDateTime
is true) but can’t be stored in a DateTime value.
public struct MySqlDateTime : IComparable, IComparable<MySqlDateTime>, IConvertible,
IEquatable<MySqlDateTime>
parameter | description |
---|---|
year | The year. |
month | The (one-based) month. |
day | The (one-based) day of the month. |
hour | The hour. |
minute | The minute. |
second | The second. |
microsecond | The microsecond. |
Public Members
name | description |
---|---|
MySqlDateTime(…) | Represents a MySQL date/time value. This type can be used to store DATETIME values such as 0000-00-00 that can be stored in MySQL (when AllowZeroDateTime is true) but can’t be stored in a DateTime value. (3 constructors) |
Day { get; set; } | Gets or sets the day of the month. |
Hour { get; set; } | Gets or sets the hour. |
IsValidDateTime { get; } | Returns true if this value is a valid DateTime. |
Microsecond { get; set; } | Gets or sets the microseconds. |
Millisecond { get; set; } | Gets or sets the milliseconds. |
Minute { get; set; } | Gets or sets the minute. |
Month { get; set; } | Gets or sets the month. |
Second { get; set; } | Gets or sets the second. |
Year { get; set; } | Gets or sets the year. |
override Equals(…) | Returns true if this MySqlDateTime is equal to obj. |
GetDateTime() | Returns a DateTime value (if IsValidDateTime is true ), or throws a MySqlConversionException . |
override GetHashCode() | Returns a hash code for this instance. |
override ToString() | Converts this object to a String. |
operator == | |
explicit operator | Converts this object to a DateTime. |
operator > | |
operator >= | |
operator != | |
operator < | |
operator <= |
See Also
- namespace MySqlConnector
- assembly MySqlConnector