Is there a question there?
Sorry the question is how to eliminate that error?
That code doesn't generate that error. From the error message it looks
like you have a returntype="something" and ColdFusion can't find the
something component (if the return type is not one of the predefined
types it's assumed to be a component).
it is not clear what you said. I need to know the answer please
He said that the code you showed would NOT cause that error.
So we can NOT tell you the answer because we do not know what the answer is.
That error would apply to a function that was told to return an instance of a ColdFusion component, but it can not find the .cfc file that would define the ColdFusion component it was told to return.
Your function is defined to return a basic data type of a date. It would not create this error.
it is not clear what you said.
The error message does not seem to be related to the code you posted
(you're returning a date but the error message is about a component).
My guess is that the problem is another function in a CFC (the same or
another CFC) - it's return type is a component that cannot be found.
But when i removed that code, I dont get the error..
Please paste the complete error message (including the stack trace).
Is it possible that the code you removed is also calling another function ?
Also, please read this
http://catb.org/esr/faqs/smart-questions.html#beprecise, it will help
you get better answers.
The error was on the function return type which should be string instead of date... Thank u for your efforts though.
Posting the full error message from the start would have helped you
get the answer much quicker.