1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Modify between two dates

Discussion in 'SQL PL/SQL' started by Mac1206, Dec 5, 2016.

  1. Mac1206

    Mac1206 Starter

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    Tampa, Fl
    I need to modify the below script and get data between these dates 2/1/2016 through 12/31/2016...Thanks in advance


    AND EXTRACT(MONTH FROM A.SERVICE_DT) = EXTRACT(MONTH FROM SYSDATE)
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,564
    Likes Received:
    362
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    It's a fairly simple change:

    and a.service_dt between to_date('01/01/2016','MM/DD/RRRR') and to_date('12/31/2016','MM/DD/RRRR')