• The secret is to be sure date_field and mask have matching formats

    TO_DATE(date_field,mask)

    like:

    to_date('07/14/2010','mm/dd/yyyy') <= This is good

    to_date('07142010','mmddyyyy') <= This is good

    to_date('20100714','yyyymmdd') <= This is good

    to_date('14/07/2010','mm/dd/yyyy') <= This is BAD

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.