Some time ago I had the same problem.
Digging the web, I�ve found the attached document about dealing with
Oracle�s date & time formats & functions.

Regards
Ricardo Derbes
Altec SE
Albarrac�n 157 - San Carlos de Bariloche
+54-2944-426892
[EMAIL PROTECTED]
----- Original Message -----
From: "Christopher G Tantalo" <[EMAIL PROTECTED]>
To: "Kipp James" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 25, 2002 12:13 PM
Subject: Re: Help on querying between dates


> "Kipp, James" wrote:
>
> >
> > > You could also use the Oracle to_date function with a format string
> > > to format your dates.
> >
> > Thanks, adam
> > Something like this??:
> >
> > my $sth = $dbh->prepare("
> >                         SELECT *
> >                                 FROM stats
> >                                 WHERE sdate BETWEEN to_char($fromDate,
> > 'DD/MM/YYY')
> >                         AND to_char($toDate,'DD/MM/YYY')
> >                                 ";
> >     or die "Cannot prepare SQL statements from $DBI::errstr\n";
> >
> >
>
> i would think you would want to use the to_date function and not the
> to_char function if you are trying to do something between a certain date
> range in Oracle.  the syntax for what you are doing should be documented
> in the Oracle books.  I know I have done what you are trying to do, I just
> cant dig up the code right now.
>
> --
> -------------------------------
> Just Your Friendly Neighborhood
> _SPIDEY_
>
>

Reply via email to