This did it: 

<cfif isDate(emergency_rss_feed.items[1].pubdate)>
                                <cfset 
date_published="#ParseDateTime(emergency_rss_feed.items[1].pubdate)#">
                                <cfset test_date="#DateAdd('h',-25,Now())#">
                                <cfif test_date lt date_published>
</cfif>

The part I was missing was ParseDateTime.

Thanks

Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged

-----Original Message-----
From: Bryan Stevenson [mailto:[email protected]] 
Sent: Thursday, September 22, 2011 1:53 PM
To: cf-talk
Subject: Re: Date Question


Convert to EST by using DateAdd() to add/subtract the correect number of hours 
and then use dateCompare() to check the CST date against now() (for the 24 
hours check)

Cheers

On Thu, 2011-09-22 at 12:52 -0400, Robert Harrison wrote:

> I have a date string I'm reading from an XML file. It's in this format:      
> 
>       Tue, 20 Sep 2011 10:20:27 CST
> 
> I'm in EST. 
> 
> How can convert this string to a data time value I can work with and tell if 
> the data is more than 24 hours old? 
> 
> 
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
> 
> Great advertising can't be either/or.  It must be &.
> 
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347608
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to