PDA

View Full Version : DateTime Null Value


e~ternal
04-27-2006, 10:13 PM
Hello,
I am having a pain in the *** time with dambed .net 2.0 datetime. I am passing it to my business object as datetime and into my stored procedure as datetime. My SQL checks to see if it has a value, if not then it defaults the db value to null. My issue is how in the hell do I declare a datetime in c# as null? I t seems i have tried everything but nothing likes it....

Thanks in advance

vinyl-junkie
04-28-2006, 05:37 AM
The MSDN library has the following code, under the topic Selecting Dates Programmatically in a Calendar Web Server Control:

Calendar1.SelectedDates.Clear();
Would that work for you?

e~ternal
04-29-2006, 06:30 PM
I figured this issue out. You have to pass it in as an object... Datetime is not allowed to have null value..

Thanks again