Getting A Random Date Between Two Given Dates In ColdFusion

<!--- Select 5 random dates. --->
<cfloop
	index="intI"
	from="1"
	to="5"
	step="1">
 
 
	<!---
		Get the random date. Since at least one of these
		passed-in date values has a time portion, then the
		UDF will automatically use time randomization even
		though no flag was sent.
	--->
	<cfset dtRandDate = RandDateRange(
		"05/01/2007 10:00 AM",
		"05/01/2007 05:00 PM"
		) />
 
	<!--- Output the date. --->
	#dtRandDate#<br />
 
</cfloop>

For Cut-and-Paste