Hi guys, i have to display Datetime in my gridview, the problem is that while i am inserting values to the database, for default date i am passing "1/1/1900", So when retrieving the data i found the value "01/01/1900 12:00:00 AM" in gridview. if the datetime is "01/01/1900 12:00:00 AM" i want it as a null value or the corresponding date, Can i check this in Store procedure? Pls help...
+3
A:
SELECT
CASE
WHEN DateField = '01/01/1900 12:00:00 AM' THEN NULL
ELSE DateField
END AS DateField
FROM
Wherever
Sean Bright
2009-05-06 05:53:15