Forums
This topic is locked
Filter Records with TODAYS date
Posted 21 Mar 2002 00:12:41
1
has voted
21 Mar 2002 00:12:41 Peter Lent posted:
I am trying to create a web page that will display current events only for the current day. I have an field called event_date in my db file in date format. How can I program it in UD so that the RS will only return records where event_date=todays date???THANKS
Peter
Replies
Replied 21 Mar 2002 00:22:31
21 Mar 2002 00:22:31 Dennis van Galen replied:
hi Peter,
You want to filter on Date()
do you know how to setup a filter in the advanced recordset window ?
it's really easy, if your query now reads:
SELECT *
FROM events
then change that to:
SELECT *
FROM events
WHERE EntryDate = Date()
events being the fieldname of your event_date entry.
i'm using it on a calender for update releases, it reads:
WHERE Datum>=Date() AND Datum<Date()+30
ORDER BY datum ASC, tijd
Works great !
With kind regards,
Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Edited by - djvgalen on 21 Mar 2002 00:25:46
You want to filter on Date()
do you know how to setup a filter in the advanced recordset window ?
it's really easy, if your query now reads:
SELECT *
FROM events
then change that to:
SELECT *
FROM events
WHERE EntryDate = Date()
events being the fieldname of your event_date entry.
i'm using it on a calender for update releases, it reads:
WHERE Datum>=Date() AND Datum<Date()+30
ORDER BY datum ASC, tijd
Works great !
With kind regards,
Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Edited by - djvgalen on 21 Mar 2002 00:25:46
Replied 21 Mar 2002 00:27:57
21 Mar 2002 00:27:57 Peter Lent replied:
Well that was easy, I feel stupid. I was trying to play with the date() command, and just could not figure out where to insert it.
THANKS
Peter
THANKS
Peter