Link to home
Start Free TrialLog in
Avatar of Kevin Smith
Kevin SmithFlag for United States of America

asked on

How would i get the parameter field in a Dreamweaver recordset to default to the latest date in a weekending recordset?

How would i get the parameter field in a Dreamweaver recordset to default to the latest date in a recordset?

I have a table (UT_DATE) that has a ton of week ending dates.  I have the below parameter that has a default of 08/12/2012.  How do I tell the parameter to check the UT_DATE table for the last weekending (I'm assuming a date diff) and make that my default.

So my table field has dates 08/12/2012, 08/19/2012, 08/26/2012, 09/02/2012, 09/09/2012...If they viewed it now I would want it to default to  09/02/2012 (the current week)...

<%
Dim Recordset1__dt
Recordset1__dt = "08/12/2012"
If (Request.Form("WeekEndingx") <> "") Then
  Recordset1__dt = Request.Form("WeekEndingx")
End If
%>
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

The simple way is to sort your recordset by your date field in descending order.
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial