Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Please Help: Dates in Oracle

Re: Please Help: Dates in Oracle

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/12/18
Message-ID: <67b7f1$hsf$1@news00.btx.dtag.de>#1/1

Mike wrote:
>
> Hello,
>
> I'm trying to write a SQL Passthrough query to an Oracle database in access.
> I seem to be having trouble querying by a date field. Here's my entire SQL
> statement:
>
> SELECT *
> FROM HREI.DEPARTMENT_CODE
> WHERE EXTRACT_DATE = #12/13/97#;
WHERE EXTRACT_DATE = to_date('#12/13/97#', '#MM/DD/RR#');

This will turn your date into 12/13/1997 internally. If you bother with century make you input data of the format '#mm/dd/yyyy#' and take as Oracle format indentifier '#MM/DD/YYYY#'. The '#' signs is Access' date-delimiter. You can drop it.

>
> HREI.DEPARTMENT_CODE is the table
>
> EXTRACT_DATE is a field containing date formatting like this:
> 10/4/97
>
> I've played arround with other fields in the database and I can query fine.
> It's with the date field that I'm having problems. Am I using the "#" signs
> correctly?
>
> Any help would be much appreciated. Thanks
>
> Mike.
 

-- 
Regards

Matthias Gresz    :-)
Received on Thu Dec 18 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US