Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Show records by date

Posted 20 Jul 2004 09:55:19
1
has voted
20 Jul 2004 09:55:19 Sam John posted:
I have set up a golf site for a friend of mine and I am having one problem. I would like to show his tour events on the home page but only display the next three events by their date. eg todays date is the 20th then the next three events finishing after the 20th should be viewable.

I have tried various ways but have had no luck. I am using an access database and ASP VB script. Currently he goes in via a back end and updates his schedule manually by turning played events off.

The web page is http;//www.share-altz.com

help is greatly appreciated
Sam

Replies

Replied 20 Jul 2004 10:20:26
20 Jul 2004 10:20:26 Rene Bandsma replied:
First of all... very nice website <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I think the best solution if to make a 'date' field within you database, and with the datediff fuction you can count the number of days between today (now) and the dates in your database.

Something like this:


<pre id=code><font face=courier size=2 id=code> datediff("D",(Recordset1.Fields.Item("date".Value), now())</font id=code></pre id=code>



Replied 20 Jul 2004 14:31:13
20 Jul 2004 14:31:13 Sam John replied:
Thanks for the positive comment re the site.

I can see how this may work but I can't get it to work can you show me the full script how it should be used... I sometimes can't get my brain to go.

Thanks

Reply to this topic