How to check date is not dbnull

I have a table with field type:datetime...
i retrieve its value from database
now if the date is null the value returned from database contains time and no date...if i check against
dbnull function it returns true even if the date is null as the field format is date and the value contains time do i check for null date.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ashish PatelCommented:
very simple while fetching the datetime column name, covert that column to have just date and not time like below

select convert(datetime, COLUMNNAME, 101) from TABLENAME and check with either dbNull or "" (blank)
use isnull(mydate)
Ashish PatelCommented:
sorry try using this

select convert(varchar(10), COLUMNNAME, 101) FROM TABLENAME
anusdesaiAuthor Commented:
Hi asvforce,
Cant change the query....can i check on the result
Ashish PatelCommented:
Yes by using the Format function on the resulting field you can do that, just try fetching "m/dd/yyyy" and if its blank or "1/1/1900" that means there is no date.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.