Solved

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

Posted on 2014-03-11
3
290 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
ID: 39920806
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
ID: 39921049
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
ID: 39921050
Excellent!!!!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Airline check in kiosk 4 105
cfchart display 12 100
ColdFusion MS SQL CSV Impport 10 66
cfchart issue with html 6 119
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
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 …
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 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