Actually, parseDateTime expects a date/time object as a parameter, so it 
would fail if the date in the RSS feed is blank. I would suggest a 
try/catch around the parsedatetime() function, and forget about the 
isDate() function.

e.g. 

<cfset variables.datetime = "">

<cftry>
        <cfset variables.datetime = parsedatetime(newsitem.pubdate.xmltext
)>
        <cfcatch>
        </cfcatch>
</cftry>

Darryl

[EMAIL PROTECTED] wrote on 30/11/2004 02:02:09 PM:

> On Tue, 30 Nov 2004 14:57:56 +1100, Ryan Sabir <[EMAIL PROTECTED]> 
wrote:
> > Heya Mike,
> > 
> > Isn't
> > 
> > "isdate(parsedatetime(newsitem.pubdate.xmltext))"
> > 
> > a bit redundant, as if CF successfully parsed the string, it will have
> > turned it into a date. If you pass something that's not a date in, the
> > above function would throw an error.
> > 
> Wel that's the point Ryan.  I had newsitem.pubdate.xmltext.  I put it
> into IsDate(), and figured if it's not a date, it'll just skip over
> the CFIF it's in.  But it didnt.  When it got something that actually
> is a date, but not apperently in the format it likes, it threw an
> error instead of just returning false so teh CFIF could skip over the
> bit of code.
> 
> This only worked when i had both isDate() and parsedatetime().  I'm
> not sure why.
> 
> Cheers
> Mike Kear
> 
> ---
> You are currently subscribed to cfaussie as: 
[EMAIL PROTECTED]
> To unsubscribe send a blank email to 
[EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/



To unsubscribe from this email please forward this email to [EMAIL PROTECTED] 

This email message is confidential and may be privileged. If you are not the 
intended recipient
please forward the email to [EMAIL PROTECTED] and delete the original.
 
ABN AMRO Morgans Limited and its associates hold or may hold securities in the 
companies/trusts mentioned herein.
Any general advice included in this email has been prepared without taking into 
account your objectives, financial situation or needs.
Before acting on the advice, you should consider its appropriateness or discuss 
with one of our investment advisors.

ABN AMRO Morgans Limited (ABN 49 010 669 726 AFSL 235410) A Participant of ASX 
Group.
A principal member of the Financial Planning Association.


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to