How to create a time span in ColdFusion

CreateTimeSpan() - create a time span

CreateTimeSpan.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CreateTimeSpan function example: how to create a time span</title>
</head>

<body>
<h2 style="color:hotpink">CreateTimeSpan Function Example</h2>

<cfquery name="qEmployee" datasource="cfdocexamples" cachedwithin="#CreateTimeSpan(0,0,30,0)#" result="Employee">
 SELECT Emp_ID, FirstName, LastName FROM EMPLOYEE
</cfquery>

<cfdump var="#Employee#">
<br />
<b>Query result catched for 30 minute TimeSpan</b>
</body>
</html>






More ColdFusion examples