Solved

check event time between start and end

Posted on 2001-06-27
5
197 Views
Last Modified: 2013-12-24
hai, i have a table called event
it contains an event name and start time and end time

if i add a new time to process (in another table), is there anyway to check whether it is within the event time or not?

eg. event A start at 10am to 2pm (store in event table)
i want to add a time, but the computer need to check event table whether there is any event exist, and also check the time.

if i input 11am, since it is within 10 to 2 pm, so cannot
but if i input 3pm, it can be done.

how the programming will look like?

thanks.
0
Comment
Question by:JYnet
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:tleish
ID: 6232067
Do you want to do this in SQL or ColdFusion?  Also, what type of database are you using?
0
 

Author Comment

by:JYnet
ID: 6233899
i am thinking of using coldfusion query to check the table in microsoft access.
:-)
0
 

Author Comment

by:JYnet
ID: 6233906
but what if the event table has option to be add or delete, so i may add another field called date inside the event table.

if something match the date in event table, it will check for start time and end time.
anything within start time and end time will not be processed.
0
 

Accepted Solution

by:
rac13 earned 20 total points
ID: 6234366
Try if this works:

<cfquery name="check_date" db="DB_Name">
SELECT event_id FROM event_table
WHERE #new_Date# NOT BETWEEN (start_date) AND (end_date)
</cfquery>

<cfif #check_date.recordcount# > 0>
   <!--- Do not insert --->
<cfelse>
   <!--- Insert into DB --->
</cfif>
0
 

Expert Comment

by:rac13
ID: 6618019
Thanks. :)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to switch email hosts (part 2) 11 69
Internal DNS Zone Issue 13 73
AWS New EC2 Instance and EBS Storage 2 78
Create sub domain on windows dedicated server. 13 59
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question