Hi programmher:
The strings are not being interpreted as a ColdFustion date/time object, I guess. I wrote the following somewhat cheesy code (since I'm relatively new at this), which works and gets the correct answer, but I'm sure some of the real experts of this forum could come up with something much more sophisticated, but here goes:
<cfset EnterDate = 20010711>
<cfset ProcessDate = 20010828>
<cfset year = Left(EnterDate,4)>
<cfoutput>#year#<br></cfoutput>
<cfset month = Mid(EnterDate,5,2)>
<cfoutput>#month#<br></cfoutput>
<cfset day = Right(EnterDate,2)>
<cfoutput>#day#<br></cfoutput>
<!--- make the date time object --->
<cfset newdate1 = CreateDate(#year#,#month#,#day#)>
<cfset year = Left(ProcessDate,4)>
<cfoutput>#year#<br></cfoutput>
<cfset month = Mid(ProcessDate,5,2)>
<cfoutput>#month#<br></cfoutput>
<cfset day = Right(ProcessDate,2)>
<cfoutput>#day#<br></cfoutput>
<cfset newdate2 = CreateDate(#year#,#month#,#day#)>
<cfoutput>Difference = #DateDiff("D",newdate1,newdate2)#</cfoutput>
Hope this helps!