|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
|
I am building a calendar and have ideas that I don't know how to build. I have the basic functionality pulling from a database and so on to make the calendar work. What I want to do is make the home page automatically pull up the next 4 hours of schedules and display them on the page. I'm sure there is something that compares Now to the database, but I don't know how to do it. Please assist with that if you can. Thanks.
|
|
|
|
|
|
#2 |
|
Member (9 bit)
Join Date: Dec 1999
Location: Midland, NC, USA
Posts: 292
|
You using SQL Server or Access?
|
|
|
|
|
|
#3 |
|
Member (10 bit)
|
It's Access 2000.
|
|
|
|
|
|
#4 |
|
Member (9 bit)
Join Date: Dec 1999
Location: Midland, NC, USA
Posts: 292
|
Try this....
WHERE datediff("h",now(),whatever_the_date_column_is) between 0 and 4 This will select rows where whatever_the_date_column_is is 0 to 4 hours in the future. You can swap the date fields to select rows where the date is 0 to 4 hours in the past. |
|
|
|
|
|
#5 |
|
Member (10 bit)
|
Thanks.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|