[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

check event time between start and end

Posted on 2001-06-27
5
Medium Priority
?
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 80 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 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