Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing empty Dates to variables
Message
 
À
24/11/2003 17:34:20
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00853097
Message ID:
00853146
Vues:
27
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#?
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform