Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Suggestions?


Message #1 by "Craig Flannigan" <ckf@k...> on Thu, 19 Sep 2002 11:54:01 +0100
I have a database which stores details of bookings.

This may contain records for 8:00am, 10:00am and so on.

The users also wish to see all the timeslots that have not been booked mixed
in with the bookings from the database. Now as the database obviously does
not store these blank bookings (as they don't exist!) how do I add them all
together

Eg.

Database contains
7:00am
7:15am
8:00am
9:00am

How do I add the times in between (such as 7:30, 7:45, 8:15am etc.) these
since they don't come from the DB?


Thanks in advance

Craig.


_____________________________________________________________________
Kingfield Heath Ltd. Email Disclaimer

Confidentiality : This email and its attachments are intended for the
above-named only and may be confidential. If they have come to you in
error you must take no action based on them, nor must you copy or
show them to anyone; please reply to this email and highlight the
error.

Security Warning : Please note that this email has been created in
the knowledge that the internet is not a 100% secure communications
medium. We advise that you understand and observe this lack of
security when emailing us.

Viruses : Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that, in keeping with
good computing practice, the recipient should ensure they are
actually virus free.
_____________________________________________________________________
Message #2 by Greg Griffiths <greg2@s...> on Thu, 19 Sep 2002 14:27:15 +0100
If you have a specified duration per session - e.g. 15 mins - then you 
could use an array and then populate in the ones that have been filled.

At 11:54 19/09/02 +0100, you wrote:

>I have a database which stores details of bookings.
>
>This may contain records for 8:00am, 10:00am and so on.
>
>The users also wish to see all the timeslots that have not been booked mixed
>in with the bookings from the database. Now as the database obviously does
>not store these blank bookings (as they don't exist!) how do I add them all
>together
>
>Eg.
>
>Database contains
>7:00am
>7:15am
>8:00am
>9:00am
>
>How do I add the times in between (such as 7:30, 7:45, 8:15am etc.) these
>since they don't come from the DB?
>
>
>Thanks in advance
>
>Craig.
>
>
>_____________________________________________________________________
>Kingfield Heath Ltd. Email Disclaimer
>
>Confidentiality : This email and its attachments are intended for the
>above-named only and may be confidential. If they have come to you in
>error you must take no action based on them, nor must you copy or
>show them to anyone; please reply to this email and highlight the
>error.
>
>Security Warning : Please note that this email has been created in
>the knowledge that the internet is not a 100% secure communications
>medium. We advise that you understand and observe this lack of
>security when emailing us.
>
>Viruses : Although we have taken steps to ensure that this email and
>attachments are free from any virus, we advise that, in keeping with
>good computing practice, the recipient should ensure they are
>actually virus free.
>_____________________________________________________________________
>


Message #3 by "Kim Iwan Hansen" <kimiwan@k...> on Thu, 19 Sep 2002 18:08:37 +0200
You could use the DateAdd() function starting at the time of the day that
your day starts and put it in a loop that adds 15 minutes for each loop -
then check if the time is booked.

for dtmTime = TimeSerial(8,0,0) to TimeSerial(10,0,0) step DateAdd("n", 15,
dtmTime)
 response.write dtmTime & "<br>"
next

-Kim

> -----Original Message-----
> From: Craig Flannigan [mailto:ckf@k...]
> Sent: 19. september 2002 12:54
> To: ASP Databases
> Subject: [asp_databases] Suggestions?
>
>
>
> I have a database which stores details of bookings.
>
> This may contain records for 8:00am, 10:00am and so on.
>
> The users also wish to see all the timeslots that have not been
> booked mixed
> in with the bookings from the database. Now as the database obviously does
> not store these blank bookings (as they don't exist!) how do I
> add them all
> together
>
> Eg.
>
> Database contains
> 7:00am
> 7:15am
> 8:00am
> 9:00am
>
> How do I add the times in between (such as 7:30, 7:45, 8:15am etc.) these
> since they don't come from the DB?
>
>
> Thanks in advance
>
> Craig.
>
>
> _____________________________________________________________________
> Kingfield Heath Ltd. Email Disclaimer
>
> Confidentiality : This email and its attachments are intended for the
> above-named only and may be confidential. If they have come to you in
> error you must take no action based on them, nor must you copy or
> show them to anyone; please reply to this email and highlight the
> error.
>
> Security Warning : Please note that this email has been created in
> the knowledge that the internet is not a 100% secure communications
> medium. We advise that you understand and observe this lack of
> security when emailing us.
>
> Viruses : Although we have taken steps to ensure that this email and
> attachments are free from any virus, we advise that, in keeping with
> good computing practice, the recipient should ensure they are
> actually virus free.
> _____________________________________________________________________
>


  Return to Index