Solved

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

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

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

790 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