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: 24 hours

Re: 24 hours

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Tue, 29 Oct 2002 02:15:20 GMT
Message-ID: <Yamv9.144652$qM2.45579@sccrnsc02>


Not sure. Are you asking to change all the data so it is a day earlier? (doesn't sound right)
That would be
update mytable set my_date_field=my_date_field-1; (subtracts a day or 24 hours)

Or does the report use the current date and you want to use the day before so the sql in the report is like

select ... from myTable where my_date_field>=sysdate then change the query to
select ... from myTable where my_date_field>=(sysdate-1) or a specific date/time
select ... from myTable where my_date_field>=to_date('10/27/2002 15:13:22','mm/dd/yyyy hh24:mi:ss')

Hope that helps.
Jim

"William F. O'Neill" <wfoneill_at_mindspring.com> wrote in message news:apkosn$hvn$1_at_slb5.atl.mindspring.net...
> Am using Oracle 8.0.4 on WINNT, and have a question about date
manipulation.
> I have a requirement at work to change a retrieval criteria for a report
> from today's date to the past 24 hours; so, let's say its 10/28/2002
> 15:13:22, my requirement is to get everyting entered from this date and
time
> backwards for 24 hours, eg. 10/27/2002 15:13:22. Have I made myself
> clear???? Can't figure this out, and I must be 'braindead' from thinking
> about for so long. The answer is probably very simple! HELP! and thank
> you.
>
>
Received on Mon Oct 28 2002 - 20:15:20 CST

Original text of this message

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