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: Kevin A Lewis <KevinALewis_at_Hotmail.com>
Date: Thu, 10 Jun 1999 14:51:37 +0100
Message-ID: <HkP73.114372$pl3.58587@newreader.ukcore.bt.net>


I may be wrong but I think the trunc may be on the wrong side of the where clause.

Regards

--
Kevin A Lewis (BOCM PAULS LTD - Animal Feed Manufacturer - Ipswich England)

                        <KevinALewis_at_HotMail.com>

The views expressed herein by the author of this document are not necessarily those of BOCM PAULS Ltd. Mark Gumbs <mgumbs_at_nospam.hotmail.com> wrote in message news:375fbdef.0_at_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:51:37 CDT

Original text of this message

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