Sysdate And To_date
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Sysdate And To_date

  1. #1
    Join Date
    Jun 2004
    Posts
    1

    Sysdate And To_date

    HOW CAN SELECT RECORDS BETWEEN THE SYSTEM DATE AND THE SYSTEM DATE - 7 DAYS. ITS BASICALLY THE EQUIVALENT OF DATEADD(). I CAN GET THE CURRENT DATE BY USING TO_DATE(SYSDATE, 'DD-MM-YYYY') BUT I CANT GET SYSDATE - 7 DAYS. THANKS....

  2. #2
    Join Date
    Jan 2003
    Location
    india
    Posts
    175
    select *
    from tablename
    where date_field > sysdate- 7
    and date_field < sysdate;

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253

    Re: Sysdate And To_date

    Originally posted by bigpomp81
    ... TO_DATE(SYSDATE, 'DD-MM-YYYY') ...
    SysDate is a date already, by the way. Don't convert it to a character string.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width