mathew_s
asked on
Oracle Date Format Issue
I am using an old software and it is running on Oracle 8i.
Trying to retrieve any result from the database but have been unsuccessful so far. Any help would be appreciated. The dates are coming from a web form.
ALTER SESSION SET NLS_DATE_FORMAT='Month.DD. YYYY';
SELECT * FROM AuditTrail WHERE DateAttempted>=TO_DATE('Ju ly 29, 2013','Month.DD.YYYY') AND DateAttempted<=TO_DATE('Oc tober 29, 2013','Month.DD.YYYY') ORDER BY AuditNo
Trying to retrieve any result from the database but have been unsuccessful so far. Any help would be appreciated. The dates are coming from a web form.
ALTER SESSION SET NLS_DATE_FORMAT='Month.DD.
SELECT * FROM AuditTrail WHERE DateAttempted>=TO_DATE('Ju
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
NLS_DATE_FORMAT is used to determine the format when Oracle needs to do an implicit data conversion.
When just selecting data I do not see where you would get the "ORA-01843: not a valid month" error.
When just selecting data I do not see where you would get the "ORA-01843: not a valid month" error.
ASKER
I believe both NLS_DATE_FORMAT and format mask were issues so points split.
ASKER
I also tried just running the second statement and get the same error.
ALTER SESSION SET NLS_DATE_FORMAT='Month DD, YYYY';
SELECT * FROM AuditTrail WHERE DateAttempted>=TO_DATE('Ju