|
| |
|
|
pould
Posts: 8 Joined: 1/6/2004 Status: offline
|
Accessing Today's Date for a database call - 1/6/2004 9:53:39
Wonder if you guys can help out. I'm trying to set up a database retrieval through Frontpage on a database with two fields - A list of dates and a second field (2 columns) - let's say the fields are "date" and "festival". What I want to be able to do is to find out what date is on the web viewer's PC, look up the date in the database and return the corresponding value. For a bit of context, the page is www.anglican-mainstream.net/index2.htm and I want to be able to return a line on the top of the page which tells the viewer what today's Holy Day or Festival is. You can see where I've started to set this up at www.anglican-mainstream.net/test.asp. I'm guessing I need to do something clever with ASAP with SQL query on the database wizard, but I'm not a programmer and I pick up webdesign as I go along. Any help gratefully received.
< Message edited by pould -- 1/6/2004 9:55:56 >
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Accessing Today's Date for a database call - 1/6/2004 11:11:27
Welcome to OutFront! Getting the date from the viewer's PC is a very tall order. Personally, I have no idea how you would do that. Besides, what if the date on the user's PC is wrong? Now, getting the date from the server hosting your site is relatively simple. You just use the VB command Date(). So, if you want to retrieve from your DB records where the date field matches today, your SQL would be something like: SELECT festival FROM YourTable WHERE [date]=#"& date() &"# Keep in mind that it is not good practice to name a db field "date", as date is a reserved word in SQL.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
pould
Posts: 8 Joined: 1/6/2004 Status: offline
|
RE: Accessing Today's Date for a database call - 1/7/2004 9:23:44
Thanks - I used the SQL you gave me and the result is at www.anglican-mainstream.net/index2.asp (the "Today the Church celebrates ___" bit in the top right hand corner). Your help was greatly appreciated.
< Message edited by pould -- 1/7/2004 9:24:55 >
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|