The createTimespan function is useful in the cachedwithin attribute of cfquery.
<cfquery name = "GetParks" datasource = "cfdocexamples" cachedWithin = "#createTimespan(0, 6, 0, 0)#">
SELECT PARKNAME, REGION, STATE
FROM Parks
ORDER by ParkName, State
</cfquery>
Instead of using dateAdd you could add a timestamp to a date object
dateFormat( createDate(2017,1,1) + createTimespan(2,0,0,0) )
Expected Result: 03-Jan-17
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.