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

Between two dates

12
hi friends

i am trying to upgrade one sql query to oracle 8i,and i am facing one problem can any one help in this situation.in that query we need a some data in between two times

ASP code is as follows
set rscheck = Server.CreateObject("ADODB.Recordset")
sqlcheck = "SELECT Tbl_RequestInfo.ReqServicetypeid, Tbl_RequestInfo.ReqArea, Tbl_RequestInfo.ReqRschedDate, Tbl_RequestSched.RschedTime, " &_
"FROM Tbl_RequestInfo INNER JOIN Tbl_RequestSched ON Tbl_RequestInfo.ReqID = Tbl_RequestSched.RschedReqid " &_
"WHERE (((Tbl_RequestInfo.ReqServicetypeid)=" & ReplaceQuote(textservicetype) & ") AND ((Tbl_RequestInfo.ReqArea)=" & STR_Quote2(ReplaceQuote(textservicearea)) & ") " &_
"AND ((Tbl_RequestInfo.ReqRschedDate)='"& FormatDateTime(textsched,2) & "') " &_
"AND ((Tbl_RequestSched.RschedTime) Between " & DateDelimiter(FormatDateTime(("schedSTime"),4)) & " And " & DateDelimiter(FormatDateTime(("schedETime"),4)) & ") " &_
"ORDER BY Tbl_RequestSched.RschedTime"


i need a data in between schedSTime & schedETime. can any one rectify my between operation is correct or not

thx
Mar 29 '08 #1
1 1285
DrBunchman
979 Expert 512MB
Hi Jestin,

I think Oracle needs to have apostrophe's around any date variables so putting those in might fix your problem.

If not, are you receiving an error when you run the above?

Dr B
Mar 31 '08 #2

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

Similar topics

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...
5
by: SimonC | last post by:
Help needed for a Javascript beginner. As above in the subject... i need a javascript to run this, but not in the form of a web-page. I want to calculate it between 2 fields in a database that...
1
by: Teresa | last post by:
I need to set criteria in a query to pull all transfer dates that are between 1 year before and 6 mos before Then I need to pull all service dates that are within six months of that...
4
by: Russell | last post by:
I have an assignment that I have to complete. I have to write a windows app in C#. Here is the spec: 1/ Date Comparison Build a program that will find the number of days between two dates. You...
8
by: Notgiven | last post by:
Say you have two dates, 2005-01-01 and 2005-01-24. I want to get a list or array or all the date between and including those two dates. I want to include this list in a query so I need it in a...
5
by: Henning M | last post by:
Hi all, I having some problems with Access and selecting records between dates.. When I try this in access, it works fine!! "Select * from Bilag Where Mdates Between #1/1/2006# And...
1
by: pitfour.ferguson | last post by:
My dbase has the start date and end date of each visit. How can I ask Access to list the day of the week of the start (easy), end (easy) and, more importantly, the dates of the visit itself - ie...
2
by: serge | last post by:
/* Subject: How best to use BETWEEN Begin and End Dates to find out if an employee was/is member of any group for a certain date range? You can copy/paste this whole post in SQL Query Analyzer...
5
by: JD | last post by:
Example Give me all the dates between 02/02/07 and 05/02/07 ? In Europe the answer must be 4 dates : 02/02/07 ; 03/02/07 ; 04/02/07 ; 05/02/07. JD.
5
by: sara | last post by:
Hi - I have had this problem MANY times and I just don't think I have the best solution. I am running a parameter query to retrieve records where work was completed between 2 dates. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.