How to Store NULL in datetime datatype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vajrala Narendra
    New Member
    • Jun 2007
    • 73

    #1

    How to Store NULL in datetime datatype

    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
  • r035198x
    MVP
    • Sep 2006
    • 13225

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

    Comment

    Working...