ASP + Time() + Access DB

S

Stuart

Hi all,

I have a problem that I just cannot figure out for the
life of me.

I am trying to set up a database that contains time slots
(6 X 4hr periods to cover the day) starting from 00:00:00 -
03:59:59 etc etc etc.

DB Fields look like this
| ID | EmailAdress | FromTime | ToTime |

Now once some one does an event of some sort, I wish to
email the person(s) contained with in the database.

The SQL string I am using in Select EmailAddress from
tblTable where #time()# BETWEEN FromTime and ToTime.

This however is causing me to get either 2 records (one is
correct one is wrong) displayed or no records displayed.

Am I doing this completely wrong? If so is there another
way?

Many thanks for help on this

Stuart
 
A

Aaron [SQL Server MVP]

Since you have identical time slots for every day, why not just use TimeSlot
= 1, 2, 3, 4, 5, 6. Then have a lookup table if you want a nice display for
the actual time they used. Your ASP code can easily take a time and convert
it to a time slot, to pass into the query...
 
E

Evertjan.

Stuart wrote on 25 jun 2004 in microsoft.public.inetserver.asp.general:
I am trying to set up a database that contains time slots
(6 X 4hr periods to cover the day) starting from 00:00:00 -
03:59:59 etc etc etc.

Do not do that, it will fill your database withs lots of useless slots,
since you can define the slots with an ASP/vbs formula.

I suppose you want to fill the slots with data, so just make a database
with these data each having a discrete time. SQL if specific data falls
into a timeslot. You could use "where .. between .." for that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top