Connecting Tech Pros Worldwide Forums | Help | Site Map

How to Store NULL in datetime datatype

Member
 
Join Date: Jun 2007
Location: Hyderabad
Posts: 73
#1: Jul 24 '08
Hi am working with asp.net with backend Sql2000

i want to store NULL in datetime datatype field through coding. i wrote a update statement as
Update table set Date1='NULL' where ........
but while updating it is giving error converting varchar to datetime

how to store NULL in that field
please respond

Thanks in Advance

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Jul 24 '08

re: How to Store NULL in datetime datatype


Don't put the quotes around NULL. The quotes are the ones making it a string.
Reply