> As u know if there is a blank date inserted into SQL SERVER db it inserts with 01/01/1900
Afaik that is not the default behavior. Is your code (a default, trigger, etc) inserting this value?
Assuming your column allows NULL values, another option is to insert a NULL instead of 01/01/1900 if the user does not select a date. Then you could use the neq "" check or
<input name="preOnHoldDate_#i#"
<cfif IsDate(mulProdOnHoldDt)>va
You could also modify getCSSProdHeadDetails so your query returns NULL if the date equals "01/01/1900"
--- sql server specific syntax
SELECT CASE WHEN YourDateColumn = convert(datetime, '01/01/1900', 101) THEN NULL
ELSE YourDateColumn
END AS YourDateColumn
FROM YourTable
WHERE .... some conditions ...
... or you could exclude both NULL and '01/01/1900' values
--- sql server specific syntax
SELECT YourDateColumn
FROM YourTable
WHERE YourDateColumn IS NOT NULL
AND YourDateColumn <> convert(datetime, '01/01/1900', 101)
Main Topics
Browse All Topics





by: SBennettPosted on 2007-09-18 at 16:15:54ID: 19917328
you could use datecompare to check and make sure the date is later than 01/01/1900 like:
t,"01/01/1 900") eq 1>#DateFormat(mulProdOnHol dDt)#</cfi f>
<cfif mulProdOnHoldDt neq "" and datecompare(mulProdOnHoldD