Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 03-10-2005, 11:49 AM filter to disappear
Junior Talker

Posts: 4
Location: Mn.
Trades: 0
I have a task table with a field called Date Finished, and I want to know how I can filter this field so that the row that the data it is in doesn't show on my web page if the task has been done for one week after the date the task was finished, I want it to not show, or something like that. I hope you understand my question.

Please help, it is important that I get this done, ASAP.

Last edited by ComputerCon; 03-10-2005 at 04:09 PM..
ComputerCon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-11-2005, 01:49 PM
Novice Talker

Posts: 8
Location: Long Island, NY
Trades: 0
I'm not sure I understand the question completely, but perhaps you can include something like the following in your SQL statement to filter out the tasks that have been finished a week ago or longer:

WHERE [Date Finished] <= dateadd("d",-7,getdate())

If you have Null values for the [Date Finished] field you may also have to include ....
... OR [Date Finished] IS NULL

Hope this helps
__________________

Please login or register to view this content. Registration is FREE
rcristel is offline
Reply With Quote
View Public Profile Visit rcristel's homepage!
 
Old 03-13-2005, 04:50 AM
Experienced Talker

Posts: 39
Trades: 0
Quote:
Originally Posted by rcristel
I'm not sure I understand the question completely, but perhaps you can include something like the following in your SQL statement to filter out the tasks that have been finished a week ago or longer:

WHERE [Date Finished] <= dateadd("d",-7,getdate())

If you have Null values for the [Date Finished] field you may also have to include ....
... OR [Date Finished] IS NULL

Hope this helps

Hey, I also was looking for something like that for some time! Thanks.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
reload2 is offline
Reply With Quote
View Public Profile
 
Old 03-22-2005, 01:25 PM
Junior Talker

Posts: 4
Location: Mn.
Trades: 0
Thanks RCristel, I'm sorry if I wasn't too descriptive with my question. I'll try to explain it better. I have a database called "Tasks" and using ASP, I call that up on a table in web page. There is a field called Date Finished to let me know that I'm done with a task, but rather then having the task that I am done with show up every time I call it, I want it to not show when the Date Finished is a week from the current date on my system. I hope that cleared things up. Below is the ASP page that I use, could you show me where to put the filter?

<html>
<body background="C:\Documents and Settings\kham\Desktop\Backgrounds\marblefaint.jpg" >

<img src="coolsilver.png">
<center><a href="index.html">Home</a>&nbsp;&nbsp;
<a href="Prison.asp">Friends Incarcerated</a></center>

<table border="1">
<tr>
<td width="312" align=center><B>Task Description</B></td>
<td width="72"align=center><B>Date Started</B></td>
<td width="72"align=center><B>Date Finished</B></td>
<td width="33"align=center><B>Dead line</B></td>
<td width="67"align=center><B>Status</B></td>
<td width="351"align=center><B>Comments/Notes</B></td>
<br>
<hr>
</tr>
<%
Dim oRSeofc

set oRSeofc=Server.CreateObject("ADODB.recordset")
oRSeofc.Open "TaskSheet", "DSN=statussheet"
oRSeofc.MoveFirst
Response.Write "<table border='1'>"
Dim PersonCounter

PersonCounter = 0
Do while NOT oRSeofc.EOF

PersonCounter =PersonCounter + 1
Response.Write "<tr><td>" & PersonCounter & "</td>"
Response.Write "<td>" & oRSeofc("Description") & "</td>"
Response.Write "<td>" & oRSeofc("Date Started") & "</td>"
Response.Write "<td>" & oRSeofc("Date Finished") & "</td>"
Response.Write "<td>" & oRSeofc("Deadline") & "</td>"
Response.Write "<td>" & oRSeofc("Status") & "</td>"
Response.Write "<td>" & oRSeofc("Comments/Notes") & "</td></tr>"
oRSeofc.MoveNext
Loop
Response.Write "</table><br>"
Response.Write PersonCounter & " Tasks in the list"
%>
</body>
</html>
ComputerCon is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to filter to disappear
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13411 seconds with 12 queries