Display Time Sensitive Material

Results 1 to 2 of 2

Thread: Display Time Sensitive Material

  1. #1
    Travis Tubbs Guest

    Default Display Time Sensitive Material

    Hi. I have been learning a little about ASP and IDC/HTX for my school&#039s web page.<BR><BR>Portions of the site are time sensitive (sports schedules and scores, newspaper articles, school events, etc.).<BR><BR>Is there a way to have an ASP page automatically display material?<BR><BR>Example 1: The front page of the school&#039s site has a area in which today&#039s and tomorrow&#039s events will be displayed. Normally, if I were to have the database list the items, it would display them all. The real issue here is to get the page to only display today&#039s events and tomorrow&#039s events without having to go and edit the page to say specific dates.<BR><BR>Example 2: Display sports scores for today and tomorrow wouldn&#039t do much good since the games haven&#039t been played yet. What it would be nice to display are the games from the day before and two days before.<BR><BR>I know it sounds like a lot, but it&#039s taken me a good 3 years to find ways to make updating our school&#039s web page a LOT easier.<BR><BR>Travis Tubbs<BR>tubbst@earthlink.net

  2. #2
    Join Date
    Dec 1969

    Default RE: Display Time Sensitive Material

    You should do the following:<BR><BR>Do a select statement that uses DATEDIFF to retrieve only those records that are two days old. Check the SQL books online for more information about DATEDIFF<BR><BR>The syntax will be like:<BR><BR>SELECT * FROM tblEvents<BR>WHERE DateDiff(d,EventDate,getdate()) BETWEEN -2 AND 0<BR><BR>(getdate() returns the current system date)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts