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

compare date against a database

2
I'm stuck trying to compare date values from users selection against a database which is Access.
This is my problem I get two date from client with mm/dd/yyyy format transfer via form to my asp file(asp with javascript). I need to check all orders between these two date.
I know The problem is that I am comparing a date in a string against a datetime datatype, but I don't know how to change format and
which one is better string to datetime or vice versa.
Any suggestions are greatly appreciated. Thank you in advance.
May 15 '07 #1
3 1674
iam_clint
1,208 Expert 1GB
string to datetime

cast(your string) as datetime
May 15 '07 #2
jhardman
3,406 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. query = "SELECT * FROM myDBTable WHERE dateOrdered BETWEEN #" & date1 & "# AND #" & date2 "#"
the access driver should recognize this correctly.

Jared
May 18 '07 #3
redhat
2
Expand|Select|Wrap|Line Numbers
  1. query = "SELECT * FROM myDBTable WHERE dateOrdered BETWEEN #" & date1 & "# AND #" & date2 "#"
the access driver should recognize this correctly.

Jared


I've done what you said and it's works.I'm so relieved now.Thanks a million!
May 29 '07 #4

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

Similar topics

4
by: Gleep | last post by:
Hey Guys, I've got a table called Outcomes. With 3 columns and 15 rows 1st col 2nd col 3rdcol outcome date price There are 15 rows...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
4
by: Gaby | last post by:
Hi all, What is the best way to compare 2 (large) ArrayLists filled with an object. Can you please help me? Gaby
2
by: dale zhang | last post by:
Hi, I have a MS access DB with some users signed in at different dates. I want to check the DB daily to compare everyone’s timestamp against current date to find who’s in our DB for more...
0
by: Mike P | last post by:
What date format does the Compare Validator check against? The date format of the web server or of the client? <asp:CompareValidator ID="CompareValidator2" runat="server" Display="None"...
3
by: prime80 | last post by:
I have a database report that is based on a query that returns actions taken on certain dates. The data looks like this: (The report based on this query is layed out similarly) Date ...
4
by: ghjk | last post by:
I want to compare user entered date with data base datetime value. Database value in datetime type and first i want to extract date part and then compare with user entered value. This is my query....
2
by: deepikashalini | last post by:
hi, Im storing Issue date in database. Issuedate stored as varchar. and then compare to Passing string date('03/06/2008') what is query to compare storing varchar date to passing string...
6
by: shapper | last post by:
Hello, I want to compare two strings in a Linq Query. In this case "Car", "cAr", "CAR" would all be the same. Should I use ==, equals, ... ? What is the best way to do this?
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
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...
0
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,...

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.