|
-
Feb 17th, 2000, 03:47 PM
#1
Please the code below:
date1 = Format(Text1.Text, "dd/mmm/yy")
date2 = Format(Text2.Text, "dd/mmm/yy")
rs.Source = "select * from SaleHead where shcustno = '" & Combo1.Text & "' and OrderDate >= '" & date1 & "' AND OrderDate <= '" & date2 & "'"
Set rs.ActiveConnection = cn
rs.Open
:-------------------------------------------:
Please see the date1 to date2 statement
I've also tried #" & date1 & "#. It dosen't work at all.
Please
-Khamal-
-
Feb 18th, 2000, 01:33 AM
#2
Lively Member
In addition, Oracle always Date/Time stamps.
You will probably have to use the TO_CHAR function to massage the date to what you want.
TO_CHAR(Orderdate, 'DD-MON-YYYY')
Also, I would double check the dates that you are using as variables. . . are you declaring them as dates or as strings?
I would run Date1 = CDate(Text1.Text) in order to make sure you're passing Dates along instead of strings.
-
Feb 18th, 2000, 05:48 AM
#3
Both work, Thank you....
-Khamal-

-
Feb 18th, 2000, 12:57 PM
#4
Junior Member
I found this at an ORACLE SQL reference site this is the correct format for an ORACLE date. ORACLE uses - not \.
DATE datatype
A standard Oracle datatype used to store date and time data. Standard date format is DD-MMM-YY, as in 01-JAN-89. A DATE column may contain a date and time between January 1, 4712 BC to December 31, 4712 AD.
Try this maybe it will work. Otherwise you may have to TO_DATE the field as it is passed to ORACLE this will slow down the system though as it by passes all indexes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|