Just to be more specific about this issue, the problem was down to the
fact that OpenBD does not automatically convert the form values to dates
in this instance.
If the values were 'real' dates then OpenBD is happy to loop over them
e.g. this works:
<cfset startDate = createDate( 2008, 1, 1 )>
<cfset endDate = createDate( 2008, 1, 5 )>
<cfset thestep = 1>
<cfloop from="#startDate#" to="#endDate#" index="i" step="#theStep#">
<cfoutput>#i#</cfoutput><br>
</cfloop>
So a workaround to your issue would be to change the code to:
<cfloop from = "#parsedatetime(form.startDate)#" to =
"#parsedatetime(form.endDate)#" index = "i" step = "#theStep#">
But since the bug is now fixed, you won't need it :)
Andy
G Rice wrote:
> I'm using a cfloop to loop over a date range.
>
> In essence, I want to insert a new record into the db for every 2
> weeks (step) of a date range (from and to)
>
> my loop looks like this...
> <cfloop from = "#form.startDate#" to = "#form.endDate#" index = "i"
> step = "#theStep#">
>
>
> This works perfectly in CF8, in openBD, I get this error...
> Data not supported: value [11/05/09] is not a number
>
> Any ideas of a work around?
>
> Thx
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
http://groups.google.com/group/openbd?hl=en
official blog @ http://blog.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---