Solved

date "1900-01-01 00:00:00.000"

Posted on 2014-03-11
3
287 Views
Last Modified: 2014-03-11
hi,

When the date textbox is empty.  It will insert into my table DateResolved like this
"1900-01-01 00:00:00.000"

I don't want to insert anthing if there is no date.

here's my code

     

    <cfif IsDefined('FORM.DateResolvedtxt') && #form.DateIdentifiedtxt# neq ''>
           <cfqueryparam value="#form.DateResolvedtxt#" cfsqltype="cf_sql_timestamp"> ,
            <cfelse>
			NULL , 
			</cfif>  

Open in new window

0
Comment
Question by:lulu50
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
Comment Utility
I think && is the wrong operator and I would test for IsDate()

<cfif IsDefined('FORM.DateResolvedtxt') and isDate(form.DateIdentifiedtxt)>
      <cfqueryparam value="#form.DateResolvedtxt#" cfsqltype="cf_sql_timestamp"> ,
<cfelse>
      NULL ,
</cfif>
0
 

Author Comment

by:lulu50
Comment Utility
gdemaria,

wow, I don't know what to say.

I have tried everything but it didn't work, nothing works with me.

Great!!

Thank you it works great now!!!

hmmm, maybe I should change my profession.

lol
Thanks again,
Lulu
0
 

Author Closing Comment

by:lulu50
Comment Utility
Excellent!!!!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now