I have a query from a database with records that contain dates<br>on my output page..i want to display a range: <br>(earliest date from query) to (last date from query)<br><br>how would i go about doing this?
<FONT FACE=monospace><b><cfset date1="1/1/2000"><br><cfset date2="6/1/2000"><br><br><cfquery datasource="mydb" name="daterange"><br>SELECT * FROM MyTable<br>WHERE Date > '#date1#'<br>AND Date < '#date2#'<br></cfquery></b></font><br><br>Hope this helps...
Use order by in your select statement and then in you rcfoutput, set the start date from the first record and the end date from the last record.<br><br> Regards,<br> Dave Joyce<br><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.