Try <cfif NOT DateDiff("d", dateLastModified, Now())> ----- Original Message ----- From: "Gilbert Midonnet" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, November 13, 2001 9:04 AM Subject: adding and subtracting dates
> I would like to show a link being active if and only if the file has been > put in the directory. A simple solution is > > if directory updated > today's date > > do x > > else > > do y > > > I thought this would be simple -- but I can't get it to work :< > > Here's some of what I've tried: > > > <CFDIRECTORY > ACTION="list" > DIRECTORY="c:\xxx\xxx\xxx" > NAME="dvp" > FILTER="*.pdf" > > > > <cfset lastModified="#dvp.dateLastModified#"> > <cfset year="#Mid(lastModified,7,4)#"> > <cfset month="#Left(lastModified,2)#"> > <cfset day="#Mid(lastModified,4,2)#"> > <cfset hour="#Mid(lastModified,12,2)#"> > <cfset minute="#Mid(lastModified,15,2)#"> > <cfset second="#Mid(lastModified,18,2)#"> > > <cfset DateToday = now()> > <cfset yearToday="#Mid(DateToday,6,4)#"> > <cfset monthToday="#Mid(DateToday,11,2)#"> > <cfset dayToday="#Mid(DateToday,14,2)#"> > > > <CFOUTPUT> > > <cfif > > #CreateDateTime('#year#','#month#','#day#','#hour#','#minute#','#second#')# > lt > #CreateDate('#yearToday#','#monthToday#','#dayToday#')# > > > > do x > > <cfelse> > > do y > > </cfif> > </CFOUTPUT> > Gilbert Midonnet > BrokerTec USA, LLC > (201) 209-7843 > > > > > -------------------------------------------------------------------------- -- > ---------------------------------------------------- > This message is for the named person's use only. It may contain > confidential, proprietary or legally > privileged information. No confidentiality or privilege is waived or lost by > any mistransmission. If > you receive this message in error, please immediately delete it and all > copies of it from your > system, destroy any hard copies of it and notify the sender. You must not, > directly or indirectly, > use, disclose, distribute, print, or copy any part of this message if you > are not the intended > recipient. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists