Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert blank date into mssql database 3

Status
Not open for further replies.

brianpercival

Programmer
Jun 13, 2005
63
US
Hi,

I have a date field which if user inputs a date should be inserted into the table, and a blank value if not. I do a cfif cfelse with the else part as default ''(empty). and the date being stored in the db is 1/1/1900 in case of empty. So when I retrieve it, it brings 1/1/1900 which I don't want. How do I store a blank date???

regards,
Brian
 
ECAR,

I know but I Don't want the field to be null. Is there any way around? :(

regards,
Brian
 
why don't you want it to be NULL?

note that a "blank" date is impossible

what dbms is this?



r937.com | rudy.ca
 
this is mssql. I guess I will have to make them allow null then..

regards,
Brian
 
what's wrong with NULL? when it comes back to CF it is "" but when you check a db you use null.

where dateField <> NULL

if queryName.dateField neq ""

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
[monkey][monkey][monkey][monkey]
holy cow wth was i thinking??

WHERE dateField IS NOT NULL

thanks rudy

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top