473,586 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date and Time comparison

29 New Member
Hi,

I fix an appointment for a patient at one time frame, when I add another appointment for someother patient for the same time frame, I should show them that the appointment is fixed already, sample data is given below

I have two fields as date datatypes

time from : 06/09/2010 08:00:00 AM

time to : 06/09/2010 10:00:00 AM

This is the data available in the database

Now I want to check for the existence of this time frame with the new time frame

These are the test data

I should not be able to fix appointment in the following time frame
1. 08:00 AM and 10:00 AM
2. 08:30 AM and 10:00 AM
3. 09:00 AM and 10:00 AM
4. 09:59 AM and 10:30 AM
because all these time frames already comes under already saved apppointment time frame (08:00 and 10:00)

I must allow the client to save the record only time frame not within the above mentioned time range

How do I write query?

thanks in advance
Sep 6 '10 #1
1 2194
amitpatel66
2,367 Recognized Expert Top Contributor
Can you provide more insight on your requirement? Sample data and sample output expected would help.
Sep 14 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
9434
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $ Last-Modified: $Date: 2003/10/28 19:48:44 $ Author: A.M. Kuchling <amk@amk.ca> Status: Draft Type: Standards Track
2
2264
by: Jon | last post by:
Hi, I am trying to pick up records from a date range without much luck. For my example below I am trying to pick up all records made in the last month. However none are being found (my code is tried and tested for all records). My database is in Access format. Field "datetime1" is of Date/Time data type getting the default value by using...
21
11064
by: Javier | last post by:
Hi I´ve a routine that will read date and times in a vector of strings ie: 30/02/2005 19:20 In some moment I´ll need to check if there are in vector a date like current date with a time >= current time and <= (current time + n minutes)
4
13876
by: mc | last post by:
How to do a time comparison? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.782 / Virus Database: 528 - Release Date: 22/10/2004
3
3284
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when the field should only be showing one or the other (date or time). Even on the back end of the database where the column properties are, I have...
2
2204
by: Nazeer | last post by:
Hi I am working in sharepoint portal sever 2007. I am filter data in data view based on some data time column (example startdate). Data view filter rows if i gave equl condition like . If i gave >= condition it is not filtering the data view. It is urgent please help me in this context Thanks and Regards Nazeer
3
1961
by: tdes42 | last post by:
I believe I am looking for some form of Join Query, but my understanding of Access logic and my logic do not yet click entirely…. I have a table of ocean buoy data, taken every hour over many days (hopefully a whole year if it doesn’t slow things down too much): tblBuoy Date Time Swell Direction Swell Period Swell...
4
2112
by: Nathan Sokalski | last post by:
When determining whether a String can be converted to a DateTime, you can use the IsDate() method. However, I would also like to know whether the string is a date, a time, or both a date and a time. Is there any simple way to do this without using manual pattern matching? Thanks. -- Nathan Sokalski njsokalski@hotmail.com...
6
2818
by: Jim Mandala | last post by:
Using MS Access 2003 with SQL Server 2005 as a backend: I am trying to automatically check for collisions in a table of appointments with an appointment currenlty being saved from the form "FormAppt". I do this by calculating an end time form the start time and duration. Then I have two queries. The first one, "QueryA", finds all the...
4
32947
by: ahmurad | last post by:
Dear Brothers, I am struggling the following four Date-Time type values which were inputted into MYSQL database in different tables. As MYSQL Default Time Format: YYYY-MM-DD HH:MM:SS, So I used the MYSQL Tables DateTime Type as Text. Time-formet 1. 04:02:27 16/01/2009 Time-formet 2. 16/01/2009 13:53:19 Time-formet 3. 00901E+13 ...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.