This discussion is archived
1 Reply Latest reply: Sep 17, 2012 7:26 AM by Sergiusz Wolicki (Oracle) RSS

Hijrah Calendar

user7520001 Newbie
Currently Being Moderated
i want to change the database calendar to be Hijrah ? i dont know how to do it, there is a command for altering the session but i want to change the database?

thank you
  • 1. Re: Hijrah Calendar
    Sergiusz Wolicki (Oracle) Expert
    Currently Being Moderated
    All calculations in the database are performed using the Gregorian calendar and all datetime values are stored in this calendar. Hijrah calendar is for textual presentation only. That is, it influences TO_CHAR, TO_DATE and the related timestamp conversion functions. You can specify NLS_CALENDAR for the session, using ALTER SESSION or the client environment setting (the latter except for JDBC Thin clients), or directly in TO_CHAR/TO_DATE/TO_TIMESTAMP calls, in the third argument to the functions. You can theoretically set NLS_CALENDAR in init.ora but this is not especially useful or recommended as the setting is usually overridden by the client.

    If you need to set the setting centrally, an AFTER LOGON trigger is probably the best option.

    -- Sergiusz


  • Correct Answers - 10 points
  • Helpful Answers - 5 points