Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 19th, 2005, 11:31 AM   #1
rjbrynteson
Newbie
 
Join Date: Oct 2005
Posts: 7
Rep Power: 0 rjbrynteson is on a distinguished road
date question

I am doing some asp work for a website and i have this field called Date (from ms sql database) that has values stored in it like "mm-dd-yy". Now i want to display only those records where date is equal too or is two weeks from the current date.

right now i only do it till EOF
here is what i have right now
which is just currently giving me all the records in the table

<%do until ObjRS.eof%>
<tr>
<td width="71" height="15"></td>
</tr>
<tr>
<td colspan="3" class="main"><b><%=ObjRS("Date")%></b></td>
</tr>


<tr class="SearchResults<%=j%>">
<td><%=ObjRS("Year")%> </td>
<td width="102"><%=ObjRS("Make")%></td>
<td width="142"><%=ObjRS("Model")%></td>
</tr>
<%
ObjRS.MoveNext
i = i + 1
%>
<%loop%>
rjbrynteson is offline   Reply With Quote
Old Oct 19th, 2005, 12:12 PM   #2
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
please use code tags around your code so that is is more legible (and to preserve the indentation):

[C O D E] your code [/ C O D E]

(without spaces in CODE)
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Oct 19th, 2005, 3:12 PM   #3
rjbrynteson
Newbie
 
Join Date: Oct 2005
Posts: 7
Rep Power: 0 rjbrynteson is on a distinguished road
<reply> thank you so much for the help :-) </reply>
rjbrynteson is offline   Reply With Quote
Old Oct 19th, 2005, 3:24 PM   #4
rjbrynteson
Newbie
 
Join Date: Oct 2005
Posts: 7
Rep Power: 0 rjbrynteson is on a distinguished road
I got code to work using
 "Select a.Year, a.Make,a.Model  from North_Yard a where a.Date >= getDate() - 7  order by a.Date DESC"
rjbrynteson is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:39 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC