473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Search Between Two Dates

Hi Friends,
I am having two datetimepicker control.One Date Time Picker Control I am getting From Date another dtp Control To Date i want to display between two date values in gridview.

I try below two query's

select * from emp where empdate<= dtp1.value and empdate>=dtp2.value

select * from emp where empdate between dtp1.value and dtp2.value

**even i used dtp1.text also.

above both are working but i am jan 2 to jan 27 means it will displaying till dec 27.

Problem is it is not comparing the months.It Only comparing Dates.

Please Can you give a good solution for this.....

Thank you.
Apr 20 '10 #1
2 3008
Monomachus
127 Expert 100+
@arunsan3
Give us an example of what you need to obtain. Also see the properties of DateTime structure, think what do you really need to compare.
DateTime Structure properties.
Apr 21 '10 #2
semomaniz
210 Expert 100+
Please post your code and show us what you have done.
Apr 21 '10 #3

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

Similar topics

5
by: Greg | last post by:
I have a page that searches a database by a repairman's name and by a date range. It pulls info by the repairman's name but pulls all info in the database regardless of the date. Below is the code...
39
by: Noticedtrends | last post by:
Can inference search-engines narrow-down the number of often irrelevant results, by using specific keywords; for the purpose of discerning emerging social & business trends? For example, if...
3
by: screenwriter776 | last post by:
Hi, folks - Perhaps you could help me with a search form I am building. I have a table with a field in it. I want to return dates inside two parameters the user enters into a search form:...
1
by: DD | last post by:
I enter a date dd/mm/yyyy in txtCriteria to search for a BuyDate this works fine in databases in the past, however i now have to enter the search date as mm/dd/yyyy BuyDate reads as dd/mm/yyyy and...
8
by: kevcar40 | last post by:
Hi I have a excel worksheet that contains a lot of data one on the columns is the date(formatted as short date "dd/mm/yyyy) i import this worksheet into access as a table the date field is...
64
by: Manfred Kooistra | last post by:
I am building a website with identical content in four different languages. On a first visit, the search engine determines the language of the content by the IP address of the visitor. What the...
3
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
16
omerbutt
by: omerbutt | last post by:
i am having an access database and have created a table named RECORDS which has the following fields cust_name......(customer name) items..............(items) date_pur..........(purchase date)...
1
by: Christina123 | last post by:
All: I have a database that tracks the withdraws and returns of shared tools. It has been requested that the datablase is made able to show all orders based on a date range. My orders only...
3
by: mintominto82 | last post by:
Hello, I am a very newbie (big emphasis on being a newbie) to c++. I read c++PRIMER but apparently, it did not provide much help. I need a bit of help in codes loading txt file in C++. My...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.