• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1608
  • Last Modified:

How to get french date to show in Oracle?

Hi
Currently when I execute statement to display date field from one of oracle table it shows date in English.
What do I have to do to change date to show in French format?
Before
    e.g.
    select date1 from simdata.policy
    29-Mar-2005
After
    e.g.
    alter session set nls_language=French
    select date1 from simdata.policy
    29-Mar-2005

I show no difference.
Thanks.
Al
0
ALad2005
Asked:
ALad2005
  • 5
  • 3
1 Solution
 
anand_2000vCommented:
alter session set nls_date_language=french;
0
 
anand_2000vCommented:
+
alter session set nls_date_format='DD-MONTH-RRRR';
or
alter session set nls_date_format='DD-MONTH-YYYY';
0
 
chedgeyCommented:
And also check with some non-March dates as French for March is Mars which if I remember correctly (no access to an Oracle instance at the moment to test) is contracted to "Mar" in Frech just as it is in English.

Your months should read as:

English-Contraction : French-Contraction
January-Jan : Janvier - Jan*
February-Feb : Fevrier-Fev
March-Mar : Mars-Mar*
April-Apr : Avril-Avr
May-May : Mai-Mai
June-Jun : Juin-Jui
July-Jul : Juillet-Jul*
August-Aug - Aout-Auo
September-Sep : September-Sep*
October-Oct : Octobre-Oct*
November-Nov : Novembre-Nov*
December-Dec : Decembre-Dec*

*Will read same in English and French when contractions are displayed

Bonne Chance!

Chedgey
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
helpneedCommented:
hi

i think anand_2000v
 is absolutly right

regards
0
 
anand_2000vCommented:
chedgey: that's the reason I have told that the asker should change the format also. as the date will come out with full name instead of an abriviated name.
0
 
chedgeyCommented:
True anand_200v, that is why I made my comment as an addition to your comments rather than a contradiction or refutation of them.

The misunderstanding lies in the fact that the original question is asked in very ambiguous language and could be read as either "How do I display my dates to show explicitly that they are in French?" or "Why do my dates appear the same after I have changed my NLS_LANGUAGE" session variable.

If the questioner is asking the former then your answer is indeed one of the correct methods for achieving this.

Regards

Chedgey
0
 
anand_2000vCommented:
That's Strange....I will be asking for a clarification. I think I deserve the points.
0
 
chedgeyCommented:
anand_2000v:
Points are irrelevant, providing the correct answer to the questioner is the important part. If yours was the required answer then you are more than welcome to the points but I think the problem is that you answered a different question to that which was being asked by ALad2005.

Regards

Chedgey
0
 
anand_2000vCommented:
read my answers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now