Skip to main content
Participating Frequently
September 23, 2011
Question

Display first and last record of the recordset in a Header

  • September 23, 2011
  • 1 reply
  • 887 views

Hello,

I'm using ASP and have a simple form where users can select an employee and then enter a date range to view hours that employee worked with more information from our database.

I want display the first date range and ending date range they entered on the search form in a header row that appears right before the repeating recordset.  I either need to display

the parameters that are URL parameters or the first and last record field item for the date.  I'm not sure how to go about this. Any help would be wonderful! 

Crystal

This topic has been closed for replies.

1 reply

Participating Frequently
September 23, 2011

select max(mydate), min(mydate) from mytable where.....

Hard to give better advice without more details...table structures, etc.

Participating Frequently
September 23, 2011

Thanks. This would work in the query but I need to know how to write this to show the MAX Date and MIN Date using ASP from the recordset.

Participating Frequently
September 23, 2011

You mean you just want to use a single recordset to display the min/max, and also display all of the records in a repeating region? You could produce the recordset sorted by date, navigate to the first record and store in a variable, then navigate to the last record and store in another variable.