Scott i have took a look at this.

You are hitting a small rounding error that happens. The dates are actually being converted to numbers under the covers. For example if you look at the real value from "CreateTimeSpan()" you will see it is 0.041666666666666664 which represents the fraction of the day.

This is one of those wee quirks of CFML that you can indeed some "funky" stuff with dates like this. But it has some side effects. It is definitely not recommended.

So a cleaner and more readable alternative would be:

------------------------------------------------
<cfset endTime = CreateTime( 23, 59, 0 )>
<cfset dtTime = CreateTime( 10, 0, 0 )>

<cfloop condition="dtTime < endTime">
  #TimeFormat( dtTime, "h:mm TT" )# <br/>
  <cfset dtTime = DateAdd("h",1,dtTime)>

  <!--- DateAdd("n",15,dtTime) for 15mins --->

</cfloop>
------------------------------------------------



Scott Sledgister wrote:
Can anyone reproduce this?  It has been a royal pain this week and
took me a couple of days to track this down to explain why report
numbers are not coming up correctly.  I hope this is reproducible.


--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to