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: Date Query Issue

Re: Date Query Issue

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Thu, 10 Jun 1999 14:40:15 +0100
Message-ID: <375fbdef.0@145.227.194.253>


Try using the trunc command to strip off the time element.

eg select ?? from table where date_field = trunc(to_date('15/05/99','DD/MM/YY');

M

Neil Robinson wrote in message <7joe5k$4bi$3_at_news6.svr.pol.co.uk>...
>I have an Access97 front end that uses Oracle 7.3 over odbc. A few of the
>queries that I need to produce involve dates or date ranges. When I try to
>query on a single date using the criteria
>
>[field] = #15/05/99#
>
>the database returns only those records which have a date of 15/5/99 and no
>time value. If there is a time value within the record it's not returned.
>ie
>
>record a: 15/5/99 11:19:04
>record b: 15/5/99
>record c: 15/5/99
>record d: 15/5/99 12:18:33
>record e: 15/5/99
>
>3 records from this set would be returned. This is not a problem when
>querying a date range as the >= and <= operators alleviate it. I also need
>to be able to query single dates though and I can't see a simple way of
>doing it, given that the date will be on a user-input form.
>
>Any ideas?
>
>Thanks in advance
>
>--
>Neil Robinson
>
>
Received on Thu Jun 10 1999 - 08:40:15 CDT

Original text of this message

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