Hi there,
.NET 2 has introduced the concepts of a nullable type, allowing you to assign null to a DateTime.
http://blogs.msdn.com/vbteam/archive...28/143813.aspx
http://msdn.microsoft.com/vcsharp/20...nullabletypes/
Alternatively, and that's how I often did it in .NET 1.x applications, you can sign it a sensible "nullable in your opinion" default value, like DateTime.MinValue.
Then you can compare against MinValue and it the date is still MinValue you can assume it's null. However, the Nullable type is of course much cleaner.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to:
The Carnival Is Over by
Dead Can Dance (Track 14 from the album:
Dead Can Dance 1981-1998 (Limited Edition) [CD2])
What's This?