This sounds overly simple, but is the date format the same on the two machines? Is it possible that the Win box is mm/dd/yy and the Unix one dd/mm/yy or some other combination? If you are forcing one date into a particular format and the other is formatted by your system defaults, that could cause the symptoms you describe.
-----Original Message----- From: Scot VanAlstine [mailto:[EMAIL PROTECTED] Sent: 29 March 2005 20:54 To: CF-Newbie Subject: Subtle differences between CF in UNIX and NT?[Scanned] For the life of me I could not figure out why I was having problems. MIchelles code works fine when run on a windows box. When I run it on my UNIX box the dates it deletes are odd. Here is the code that runs fine on NT <cfset deletedate = #dateadd("d",-60,now())#> <cfset newformateddate = #dateformat(createdate(year(deletedate), month(deletedate), day(deletedate)), "mm/dd/yyyy")#> <cfset cleanup_path = "/isweb/weblogs/bbpt/"> <CFdirectory directory=#cleanup_path# NAME="CleanUpDirectory" SORT="name ASC, size DESC"> <CFLOOP Query="CleanUpDirectory"> <CFIF #type# IS "File"> <CFIF #datelastmodified# LT #newformateddate# > <CFFILE ACTION="Delete" FILE="#cleanup_path##Name#"> </CFIF> </CFIF> C'mon ya'll There is bound to be someone out there who knows the answer! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Save $10 Download ZoneAlarm Security Suite http://www.houseoffusion.com/banners/view.cfm?bannerid=66 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:800 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
