Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2004
    Posts
    6

    Unhappy Unanswered: What is the EQUIVALENT OF NLS_LANGUAGE(oracle) IN DB2

    Hi,
    Can anyone help me?
    I need to know what is the equivalent of NLS_LANGUAGE or
    NLS_CHARACTER _SET parameter of Oracle in DB2.
    I want to see the current date in language other than english.
    say in Arabic , so how do I do that?

    For your information
    the query
    SELECT TO_CHAR(SYSDATE,'MON','NLS_DATE_LANGUAGE=ARABIC') FROM DUAL;
    will return the month name (first 3 letters of the month) in Arabic language.
    I wish to do the same in DB2.

    Thanks in advance
    mailar

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    nls

    there is none
    you have to bind the cli or your application with the option date ....
    to get the data in a specific format
    Best Regards, Guy Przytula
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Nov 2004
    Posts
    6

    How do I do this Binding?

    Can you please tell me more about this binding?
    An example would be highly helpful I suppose


  4. #4
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    Try this out:
    Code:
    select substr(monthname('2004-01-01'),1,3) from sysibm.sysdummy1
    Note: date is written in ISO standard format: year-month-day.

    Hope this helps,
    Grofaty

  5. #5
    Join Date
    Nov 2004
    Posts
    6

    Red face But what about languages like Arabic

    Hey Grofaty,
    Thanks for the query but I want to know the date in various languages like Arabic , Chinese which I can specify using NLS_DATE_LANGUAGE parameter of TO_CHAR function (in Oracle). So, please tell me how can I do the same in DB2

  6. #6
    Join Date
    Nov 2004
    Posts
    374

    date format

    I don't think this is possible
    the only formatting possibilities are with date format at bind time
    [DATETIME {DEF | USA | EUR | ISO | JIS | LOC}]
    if the client is english you will get months... in english ..
    Best regards, Guy Przytula
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  7. #7
    Join Date
    Nov 2004
    Posts
    23
    Hi all!

    I am sorry for mine poor English!

    I have DB2 UDB 8.2 for Win2000.

    I while the beginner in DB2 (9 years of experience in Oracle) also. I too have the same problem and can only offer as workaround (checked up only in my environment), set country, necessary for you, in Local preferences of the DB2 instance user account. After that a title month, day of week will be mapped in language of the established country.

    P.S. See also http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=291&thread=64959&message=51326 73. Here my problem, which has remained without the answer.

    Best regards, Dmitriy.
    Last edited by kdima71; 11-30-04 at 09:13.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •