Solved

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

Posted on 2014-03-11
3
289 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

22 Experts available now in Live!

Get 1:1 Help Now