if you are seeing 1/1/1900 after insert you are inserting a blank value and not a null value...sql server allows null dates (provided allow nulls is set in tbl def)
make sure you are using NULL
insert into myTbl (ID, Value1, NULL)
and not
insert into myTbl (ID, Value1, '')
or
<cfif form.Mydate EQ ''>
<cfset myDateVar = NULL>
<cfelse>
<cfset myDateVar = form.myDate>
</cfif>
insert into myTbl (ID, Value1, #myDateVar#)
Main Topics
Browse All Topics





by: tim_csPosted on 2004-05-11 at 09:33:18ID: 11042182
Have you tried using NULL
Insert into table(id, date)
values(332, NULL)