Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:24:09+00:00 2026-05-28T02:24:09+00:00

Have some dates in my local Oracle 11g database that are in this format:

  • 0

Have some dates in my local Oracle 11g database that are in this format:

01-JUL-85

How do I change it to this format (mm/dd/yyyy) using PL/SQL:

7/01/1985

With thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:24:10+00:00Added an answer on May 28, 2026 at 2:24 am

    If the column is a date datatype then it is only your NLS_DATE settings that are causing them to be displayed in the format DD-MON-YYYY.

    To check your current NLS_DATE format run the following:

    SELECT value 
      FROM V$NLS_Parameters 
     WHERE parameter ='NLS_DATE_FORMAT';
    

    Oracle stores all dates in an internal binary format and uses the NLS_DATE format to display them (unless explicitly told to display them differently).

    You can either alter your NLS_DATE settings to MM/DD/YYYY or TO_CHAR the date column using:

    TO_CHAR(<date_column>, 'MM/DD/YYYY')
    

    to see the format you require.

    You can alter the NLS_DATE format for your current session or alter the database parameters to change the default NLS_DATE format for the database itself.

    If the column is a VARCHAR2 type then you’ll need to convert to a date first and then you can format the output using either of the methods described above.

    See: http://ss64.com/ora/syntax-nls.html

    and: http://www.dba-oracle.com/t_nls_date_format_sysdate.htm

    e.g.

    SELECT TO_CHAR(sysdate, 'MM/DD/YYYY') as current_date
      FROM dual;
    

    or

    ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';
    
    SELECT sysdate
     FROM dual;
    

    In pure PL/SQL

    DECLARE
       v_date DATE := sysdate;
    BEGIN
       DBMS_OUTPUT.put_line(TO_CHAR(v_date, 'MM/DD/YYYY'));
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that uses the Oracle function add_months to increment a Date
I have to use some dates and times from a legacy database. They are
I have some Ruby code which takes dates on the command line in the
I would like to compare two dates in javascript. I have been doing some
I have some data, like this: BUG DATE STATUS ---- ---------------------- -------- 9012 18/03/2008
I have some UI in VB 2005 that looks great in XP Style, but
I need some help trying to figure out how to format dates in perl.
i have some experience with MySQL but none with SQL Server, i have a
I have some records and I only want to show that day so if
I am storing all my dates in UTC format in my database. I ask

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.