Dynamically Calculating within a cfoutput
I am using window 10, 64bit on a PC. I am also using Coldfusion 2016. I did a Coldfusion query output that displays a history of reading input of water usage for an apartment from an electronic submeter. I am able to output the date of the meter reading and the gallons of water that was used. What I'm having difficulty with is creating two additional columns that dynamically calculate within the same query output the days lapse between each meter reading and the difference in the water used since the last read. Any insights. I've listed my code.
<!--- query of submeter reading. --->
<cfquery name="list_water_usage" datasource="submeter">
select * from readsubmeter where reasubid = '#choose_submeterID.subid#' Order by reasubreaddate DESC</cfquery>
