473,387 Members | 1,925 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,387 software developers and data experts.

dates problem

121 100+
Hi all
i have access databae in which a table consists of all staff details with dat now if want to retrieve records between 5/01/2008 to 10/01/2008.i dot know the syntax of using between query can u pls help
Jan 12 '08 #1
5 1171
QVeen72
1,445 Expert 1GB
Hi all
i have access databae in which a table consists of all staff details with dat now if want to retrieve records between 5/01/2008 to 10/01/2008.i dot know the syntax of using between query can u pls help
Hi,

Check this :

SELECT * From MyTable Where MYDate Between #05-01-2008#
And #10-01-2008#

Regards
Veena
Jan 12 '08 #2
charvi
121 100+
rs.Open "select * from timesheet where date between #" & mskfrom & "#" And "# & mskTo & #", con, adOpenDynamic, adLockOptimistic

I have written this ode but it giv me runtime error.
pls help
Jan 13 '08 #3
charvi
121 100+
rs.Open "select * from timesheet where date between #" & mskfrom & "#" And "# & mskTo & #", con, adOpenDynamic, adLockOptimistic

I have written this ode but it giv me runtime error.
pls help
when writethis code it gives all the records..e if i want to search between 2/01 and 5/01 igives me al recordsof 6/1 ,7/01 so on
Jan 13 '08 #4
charvi
121 100+
when writethis code it gives all the records..e if i want to search between 2/01 and 5/01 igives me al recordsof 6/1 ,7/01 so on
i getthis dateproble when i enter in the form of mm/dd/yyyy in mskedbox1 though i have formatted maskedbox as dd/mm/yyyy why is it pls help
Jan 13 '08 #5
Killer42
8,435 Expert 8TB
i getthis dateproble when i enter in the form of mm/dd/yyyy in mskedbox1 though i have formatted maskedbox as dd/mm/yyyy why is it pls help
You need to show us the exact string which is being passed to Access. The fact that the masked edit control shows something in a particular format on the form doesn't tell us anything about what you're getting out of it.

Pretty sure Access demands U.S. date format (MM/DD/YYYY) so the syntax should be something like...

SELECT * From MyTable Where MyDate Between #01/05/2008# And #01/10/2008#

Alternatively, you might avoid the date format issue by using an unambifuous format. That is, one in which the month and day cannot be confused. For example...

SELECT * From MyTable Where MyDate Between #05-Jan-2008# And #10-Jan-2008#
Jan 13 '08 #6

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

Similar topics

4
by: F | last post by:
Hi I have posted the question few days back about problem in inserting the dates in SQL server and thankful to them who replied. That was solved and this is a nice solution....
5
by: PW | last post by:
<rant> Sorry guys, but I just have to whinge. Dates in ASP are a total pain in the butt! I seem to get caught out so many times. I realise its my own fault, but going from the posts in this...
7
by: Bambero | last post by:
Hello all Problem like in subject. There is no problem when I want to count days between two dates. Problem is when I want to count years becouse of leap years. For ex. between 2002-11-19...
7
by: smcgouga | last post by:
Visual Basic 6. ADO 2.8 I have an as400 DB2 V5R1 datasource. Dates are defined as *ISO format and have a range from '0001-01-01' to '9999-12-31'. I am trying to update a date field on the...
3
by: SJH | last post by:
I currently have reports (mostly graphs) that utilize dates entered into a form. The dates are pretty baisc from the standpoint of the start and end of the current fiscal year, the start and end...
1
by: Likhith Areekkal | last post by:
Hi, Language: C#, asp .net application This is a room reservations web application. I have two Calendars on my website: Calendar1 & Calendar2 Calendar1 shows the current month and Calendar2...
12
by: Dixie | last post by:
I am trying to calculate the number of workdays between two dates with regards to holidays as well. I have used Arvin Meyer's code on the Access Web, but as I am in Australia and my date format is...
2
by: Jim Carlock | last post by:
(1) Does PHP provide any way to handle dates prior to 1980? I know there's problems with Microsoft Windows NT and all Windows NT operating systems will allow a date prior to 1980 to be placed...
5
by: jorgedelgadolopez | last post by:
Hi all, I am using the xpathnavigator evaluate function on .net (xpath 1 right?). Now I need to expand the code to do multiple contains, compare dates (such as 'before', 'between' and 'after'),...
5
by: Dave | last post by:
Hello, I have a possible problem exporting a text field that happens to contain dates (but is not a date field) when using TransferText in MS Access 2000. I am exporting a query to a text...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.