How to display distinct date in a dropdown
i know i've done before. life of me can't see i'm doing wrong. have query outputing date/time formats access database select dropdown box. can't duplicate dates out. i'm wondering if because time in database different each row? want display 1 9/8/2006 if there 40 of them. below code:
<cfquery name="qdate" datasource="mydb">
select distinct entereddate archivedletters order entereddate
</cfquery>
<!---the output--->
<form action="queryarchived.cfm" name="startdate" method="post">
<strong>search sample numbers date range:</strong><br>
beginning:<br>
<select name="startdate">
<cfoutput query="qdate">
<option value="#entereddate#">#dateformat(entereddate, 'mm/dd/yy')#</option>
</cfoutput>
</select>
<br>
end:<br>
<select name="enddate">
<cfoutput query="qdate">
<option value="#entereddate#">#dateformat(entereddate, 'mm/dd/yy')#</option>
</cfoutput>
</select>
<input type="submit" value="go">
</form>
<cfquery name="qdate" datasource="mydb">
select distinct entereddate archivedletters order entereddate
</cfquery>
<!---the output--->
<form action="queryarchived.cfm" name="startdate" method="post">
<strong>search sample numbers date range:</strong><br>
beginning:<br>
<select name="startdate">
<cfoutput query="qdate">
<option value="#entereddate#">#dateformat(entereddate, 'mm/dd/yy')#</option>
</cfoutput>
</select>
<br>
end:<br>
<select name="enddate">
<cfoutput query="qdate">
<option value="#entereddate#">#dateformat(entereddate, 'mm/dd/yy')#</option>
</cfoutput>
</select>
<input type="submit" value="go">
</form>
why formatting date once out of database? hasn't been formatted? or missing something?
More discussions in ColdFusion
adobe
Comments
Post a Comment