Feedback
Did this article resolve your question/issue?

   

Article

How to alter the date format when the application date parameters do not match the format of the Oracle database.

Information

 
TitleHow to alter the date format when the application date parameters do not match the format of the Oracle database.
URL NameHow-to-alter-the-date-format-when-the-application-date-parameters-do-not-match-the-format-of-the-Oracle-database
Article Number000182506
EnvironmentProduct: Connect/Connect64 for ODBC, Connect for JDBC, Connect for ADO.NET, Progress DataDirect for ODBC/JDBC
Version: All supported versions
OS: All supported platforms
Database: Oracle
Application: All supported applications
Question/Problem Description
How to alter the date format when the application date parameters do not match the format of the Oracle database.
Steps to Reproduce
Clarifying Information
An application may have a date parameter specified as DD/MM/YYYY. The default Oracle date format is YYYY/MM/DD. The application session with the database can be changed to allow date parameters to be entered in the database without error or data corruption.
Error Message
Defect Number
Enhancement Number
Cause
Resolution
To determine how the date format is configured on the Oracle database run:

SELECT value FROM nls_session_parameters WHERE parameter = 'NLS_DATE_FORMAT'

If date parameters in the application are specified in a different format, the application session with the database can be changed. In the application set the NLS_DATE_FORMAT format to match the application parameters.
Use the following statement to set the desired date format.
ALTER SESSION SET nls_date_format = '<desired_format'

For example:
ALTER SESSION SET nls_date_format = 'dd/mm/yyyy'
Workaround
Notes
Last Modified Date6/1/2021 3:03 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.