Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: TIMESTAMP query
June Moore wrote:
> Can you pls tell me how to select where a TIMESTAMP date is N hours
> ago?
>
> select * from <table> where job_date ... ?
>
> thanks
> JM
SQL*Plus: Release 10.1.0.4.0 - Production on Tue Aug 30 01:03:38 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select to_char(systimestamp, 'HH:MI:SS') from dual;
TO_CHAR(
SQL> ed
Wrote file afiedt.buf
1* select to_char(systimestamp-1/24, 'HH:MI:SS') from dual SQL> / TO_CHAR(
SQL>
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Tue Aug 30 2005 - 03:04:15 CDT
![]() |
![]() |