J
jehugaleahsa
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Yes, SQL Server alows it. On the other hand, .Net does not (DateTime in
.Net is a Value Type) so be careful when designing your client code to
receive the DateTime values returned from Sql Server.
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Jon Skeet said:Well, so long as you're not using .NET 1.1 there's the fairly obvious
choice of Nullable<DateTime> (aka "DateTime?").
SqlDateTime is a bit safer because its MinValue and MaxValue match those
of SQL Server.
Jon Skeet said:I also tend to avoid using MinValue and MaxValue in the first place,
as they're rarely useful values.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.