Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing empty Dates to variables
Message
 
To
24/11/2003 17:34:20
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00853097
Message ID:
00853146
Views:
28
Remember that .net is a strongly typed language. DateTime is a value type, not a reference type, so it must contain a value. Here is the information from the help file:
"The DateTime value type represents dates and times with values ranging from 12:00:00 midnight, January 1, 0001 Anno Domini (Common Era) to 11:59:59 P.M., December 31, 9999 A.D. (C.E.)"

If you want interoperability, I suggest you store empty dates as nulls. In that case, look at the System.DBNull class http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdbnullclasstopic.asp


>Here is my question :
>Can I assign an empty datetime value to a DateTime variable in c#?
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform