Syntax/Format of Date Literals
Date: 17 May 2002 05:58:23 -0700
Message-ID: <3628077d.0205170458.2b26c9fd_at_posting.google.com>
I'm using ADO to read data from an Oracle table. The Oracle table has
a CREATED_ON field that is a date/time format. I need to add
selection criteria to my WHERE clause that selects records created
within a specific date/time range. I tried using the TO_DATE PLSQL
function, but that chops the time portion off my VB date/time
variable. My ADO looks something like this:
SELECT * FROM tbl
"AND TO_DATE('" & format(dte2, "dd-mmm-yyyy") & "')"
WHERE
tbl.CREATED_ON BETWEEN TO_DATE('" & format(dte1, "dd-mmm-yyyy") &
"') " & _
my problem is that by formating my visual basic date time variable to a format that oracle will accept as input to the TO_DATE function, drops the time portion of my variable.
TIA for any help,
Scott
Received on Fri May 17 2002 - 14:58:23 CEST