Hijri Date (arabian calendar)

Gentlemen:
i'm desinging a databse schema for arabic data
is there a new data type for hijri arabian mothes?
or i should use varchar2 (text) data type
is there a ready sotred procedures for that or what?

I am no quite sure if I understood your question. But you can just use the regular DATE datatype, if you need to store dates into the database. Use the NLS_CALENDAR parameter (set using ALTER SESSION or an an environment variable) to switch between the different Calendar systems including Arabic Hijrah.

Similar Messages

  • Create a function that convert date Gregorian calendar to Hijri calendar

    hey guys, i had an assesment i need to finish as my test for flash developer vacancy...
    i need to create a function that convert date Gregorian calendar to Hijri calendar in flash
    is that possible??
    i've search through google, but still doesnt find anything useful yet..
    kinda need ur help plz.....

    http://www.codeproject.com/KB/datetime/hijrigregorianclass.aspx

  • Convert  Solar Hejra(Hijri) date  to Anno Domini date

    Hi everyone:
    I am developeing an application cfm format. The company has
    some paper forms that the dates are in Solar Hejra(Hijri) date
    format and I need them to be converted into Anno Domini date. Do
    you know any solution/tutorial or ready_to_use code in cfm format?
    Or if it is not avaiable what do you seggest? I use some javascript
    code? Do you know one that does it for me?
    Thanks
    Benign

    Benign wrote:
    > Hi:
    > Thanks for the fast reply.
    > I will work on and try to make a neat convertor but do
    you know any
    > ready_to_use convertor? The one that only converts
    Persian Date into Gregorian
    > Date it is all I need.
    that *is* a ready to use convertor. to convert the islamic
    calendar dates to
    gregorian (well to cf datetime objects) you use the
    i18nDateParse function. you
    can ignore the rest of the methods in that CFC (though if you
    deal w/this sort
    of thing once, you'll likely deal with it again). the only
    tricky bit is knowing
    if the original islamic dates are based on civil or religious
    calendars.

  • Gregorian-Hijri Dates Converter

    Hello Experts;
    I am looking for ABAP Report/Function module for "Gregorian <=> Hijri Dates Converter".
    Any assistance in this regards would be highly appriciated and points will be rewarded.
    Looking forward for your usual prompt and professional advice...
    Best Regards,
    Aslam
    You may ask... What is Hijri Calender?
    <a href="http://en.wikipedia.org/wiki/Hijri">en.wikipedia.org/wiki/Hijri</a>
    The Islamic calendar or Muslim calendar (also called "Hijri calendar", Arabic) is the calendar used to date events in many predominantly Muslim countries, and used by Muslims everywhere to determine the proper day on which to celebrate Islamic holy days. It is a lunar calendar having 12 lunar months in a year of about 354 days. Because this lunar year is about 11 days shorter than the solar year, Islamic holy days, although celebrated on fixed dates in their own calendar, usually shift 11 days earlier each successive solar year, such as a year of the Gregorian calendar. Islamic years are also called Hijra years because the first year was the year during which the Hijra occurred— Muhammad's emigration from Mecca to Medina. Thus each numbered year is designated either H or AH, the latter being the initials of the Latin anno Hegirae (in the year of the Hijra).

    Hi,
            use the below sub-routines in ABAP to convert Gregorian to Hijri dates and vice versa
    DATA: WF_RESULT1 TYPE I,
          WF_RESULT2 TYPE C,
          WF_DATE1   TYPE SY-DATUM,
          WF_DATE2   TYPE SY-DATUM.
    *WF_DATE1 = '14271123'.
    WF_DATE1 = SY-DATUM.
    PERFORM F_GREGORIANTOHIJRA1 USING    WF_DATE1
                          CHANGING WF_DATE2.
    WRITE:/ WF_DATE1,WF_DATE2.
    PERFORM F_HIJRATOGREGORIAN1 USING    WF_DATE2
                               CHANGING WF_DATE1.
    WRITE:/ WF_DATE1,WF_DATE2.
    *&      Form  F_GREGORIANTOHIJRA1
          text
         -->P_GREG_DATEtext
         -->P_HIJRA_DATtext
    FORM F_GREGORIANTOHIJRA1 USING  P_GREG_DATE
                                  CHANGING P_HIJRA_DATE.
      DATA: LOC_MM(2) TYPE N,
            LOC_DD(2) TYPE N,
            LOC_YY(4) TYPE N.
      DATA: LOC_HIJ_MM(2) TYPE N,
            LOC_HIJ_DD(2) TYPE N,
            LOC_HIJ_YY(4) TYPE N.
      DATA: LOC_JD TYPE P DECIMALS 2,
            LOC_LL TYPE P DECIMALS 2,
            LOC_LN TYPE P DECIMALS 2,
            LOC_LJ TYPE P DECIMALS 2.
      LOC_YY = P_GREG_DATE+0(4).
      LOC_MM = P_GREG_DATE+4(2).
      LOC_DD = P_GREG_DATE+6(2).
      IF ( LOC_YY > 1582 ) OR
         ( LOC_YY = 1582 AND LOC_MM > 10 ) OR
         ( LOC_YY = 1582 AND LOC_MM = 10 AND LOC_DD > 14 ).
        LOC_JD = TRUNC( ( 1461 * ( LOC_YY + 4800 + TRUNC( ( LOC_MM - 14 ) / 12 ) ) ) / 4 ) +
                 TRUNC( ( 367 * ( LOC_MM - 2 - 12 * ( TRUNC( (  LOC_MM - 14 ) / 12 ) ) ) ) / 12 ) -
                 TRUNC( ( 3 * ( TRUNC( ( LOC_YY + 4900 + TRUNC( ( LOC_MM - 14 ) / 12 ) ) / 100 ) ) ) / 4 ) + LOC_DD - 32075.
      ELSE.
        LOC_JD = 367 * LOC_YY - TRUNC( 7 * ( LOC_YY + 5001 + TRUNC( ( LOC_MM - 9 ) / 7 ) ) ) / 4 +
                 TRUNC( ( 275 * LOC_MM ) / 9 ) + LOC_DD + 1729777.
      ENDIF.
      LOC_LL = LOC_JD - 1948440 + 10632.
      LOC_LN = TRUNC( ( LOC_LL - 1 ) / 10631 ).
      LOC_LL = LOC_LL - 10631 * LOC_LN + 354.
      LOC_LJ = ( TRUNC( ( 10985 - LOC_LL ) / 5316 ) ) * ( TRUNC( ( 50 * LOC_LL ) / 17719 ) ) +
               ( TRUNC( LOC_LL / 5670 ) ) * ( TRUNC( ( 43 * LOC_LL ) / 15238 ) ).
      LOC_LL = LOC_LL - ( TRUNC( ( 30 - LOC_LJ ) / 15 ) ) * ( TRUNC( ( 17719 * LOC_LJ ) / 50 ) ) -
               ( TRUNC( LOC_LJ / 16 ) ) * ( TRUNC( ( 15238 * LOC_LJ ) / 43 ) ) + 29.
      LOC_HIJ_MM = TRUNC( ( 24 * LOC_LL ) / 709 ).
      LOC_HIJ_DD = LOC_LL - TRUNC( ( 709 * LOC_HIJ_MM ) / 24 ).
      LOC_HIJ_YY = 30 * LOC_LN + LOC_LJ - 30 .
      CONCATENATE LOC_HIJ_YY LOC_HIJ_MM LOC_HIJ_DD
      INTO        P_HIJRA_DATE.
    ENDFORM.                    "F_HIJRATOGREGORIAN1
    *&      Form  F_HIJRATOGREGORIAN1
          text
         -->P_HIJRA_DATtext
         -->P_GREG_DATEtext
    FORM F_HIJRATOGREGORIAN1 USING  P_HIJRA_DATE
                                  CHANGING P_GREG_DATE.
      DATA: LOC_MM(2) TYPE N,
            LOC_DD(2) TYPE N,
            LOC_YY(4) TYPE N.
      DATA: LOC_HIJ_MM TYPE I,
            LOC_HIJ_DD TYPE I,
            LOC_HIJ_YY TYPE I.
      DATA: LOC_HIJ_MM1(2) TYPE N,
            LOC_HIJ_DD1(2) TYPE N,
            LOC_HIJ_YY1(4) TYPE N.
      DATA: LOC_JD TYPE P DECIMALS 2,
            LOC_LL TYPE P DECIMALS 2,
            LOC_LN TYPE P DECIMALS 2,
            LOC_LK TYPE P DECIMALS 2,
            LOC_LI TYPE P DECIMALS 2,
            LOC_LJ TYPE P DECIMALS 2.
      LOC_YY = P_HIJRA_DATE+0(4).
      LOC_MM = P_HIJRA_DATE+4(2).
      LOC_DD = P_HIJRA_DATE+6(2).
      LOC_JD = ( ( 11 * LOC_YY + 3 ) / 30 ) +
               354 * LOC_YY + 30 * LOC_MM -
               ( ( LOC_MM - 1 ) / 2 ) + LOC_DD + 1948440 - 385 .
      IF LOC_JD >  2299160.
        LOC_LL = LOC_JD + 68569.
        LOC_LN = TRUNC( ( 4 * LOC_LL ) / 146097 ).
        LOC_LL = ( LOC_LL - TRUNC( ( 146097 * LOC_LN + 3 ) / 4 ) ).
        LOC_LI = TRUNC( ( 4000 * ( LOC_LL + 1 ) ) / 1461001 ).
        LOC_LL = ( LOC_LL - TRUNC( ( 1461 * LOC_LI ) / 4 ) + 31 ).
        LOC_LJ = TRUNC( ( 80 * LOC_LL ) / 2447 ).
        LOC_HIJ_DD = LOC_LL - TRUNC( ( 2447 * LOC_LJ ) / 80 ).
        LOC_LL     = TRUNC( LOC_LJ / 11 ).
        LOC_HIJ_MM = LOC_LJ + 2 - ( 12 * LOC_LL ).
        LOC_HIJ_YY = 100 * ( LOC_LN - 49 ) + LOC_LI + LOC_LL.
      ELSE.
        LOC_LJ = LOC_JD + 1402.
        LOC_LK = TRUNC( ( LOC_LJ - 1 ) / 1461 ).
        LOC_LL = LOC_LJ - 1461 * LOC_LK.
        LOC_LN = TRUNC( ( LOC_LL - 1 ) / 365 ) - TRUNC( LOC_LL / 1461 ).
        LOC_LI = LOC_LL - 365 * LOC_LN + 30.
        LOC_LJ = TRUNC( ( 80 * LOC_LI ) / 2447 ).
        LOC_HIJ_DD = LOC_LI - TRUNC( ( 2447 * LOC_LJ ) / 80 ).
        LOC_LI     = TRUNC( LOC_LJ / 11 ).
        LOC_HIJ_MM = LOC_LJ + 2 - ( 12 * LOC_LI ).
        LOC_HIJ_YY = 4 * LOC_LK + LOC_LN + LOC_LI - 4716.
      ENDIF.
        LOC_HIJ_MM1 = LOC_HIJ_MM.
        LOC_HIJ_DD1 = LOC_HIJ_DD.
        LOC_HIJ_YY1 = LOC_HIJ_YY.
        CONCATENATE LOC_HIJ_YY1 LOC_HIJ_MM1 LOC_HIJ_DD1
        INTO        P_GREG_DATE.
      ENDFORM.                    "F_HIJRATOGREGORIAN1

  • How to display hijri date..

    hi everyone!
    can someone tell how to convert georgian date into hijri date...
    and if the date is some old date....
    thanks and regards
    Tariq.

    Here are a few things you might need to know.
    1.How to set Calendar to "Arabic Hijrah" ?
    2.How to display both Hijrah and Gregorian dates in the same select statement?
    3.What is Calendar Deviation?
    4.How to set deviation?
    Questions & Answers
    1.How to set Calendar to "Arabic Hijrah" ?
    Answer
    Set NLS_CALENDAR parameter in one of the following ways:
    1. In the Current session :
    SQL> alter session set NLS_CALENDAR="Arabic Hijrah" ;
    2. All applications for a specific client:
    Set NLS_CALENDAR Variable in client OS environment.
    <e.g: On NT: set variable in the registry
    On Unix: set UNIX environment variable in .profile/.cshrc>
    3. Within SQL function:
    SQL> select to_char(sysdate,'day dd month yyyy','nls_calendar=''arabic hijrah''')
    from dual ;
    References
    <Note:30772.1>
    2.How to display both Hijrah and Gregorian dates in the same select statement?
    Answer
    select
    to_char(sysdate,'day dd month yyyy','nls_calendar=''arabic hijrah'''),
    to_char(sysdate,'day dd month yyyy','nls_calendar=''gregorian''')
    from dual ;
    References
    <bug:1302683>
    3.What is Calendar Deviation?
    Answer
    Since Hijrah month is based on the moon complete revolution around the sun, Hijrah
    Calendar has different number of days in a year than Gregorian; therefore some manual
    deviation adjustement might be needed for the conversion to/from Gregorian. In other
    words HIJRAH calendar is Lunar based, corrections need to be made every so often.
    4.How to set deviation?
    Answer
    1. Shutdown the database
    2. Edit lxecal.nlt (lxecal.dat in Oracle7) in $ORACLE_HOME/ocommon/nls.
    e.g: to add one day after Sep-29-2000:
    DEFINE calendar
    calendar_name = "Arabic Hijrah"
    DEFINE calendar_deviation
    deviation_data = {
    <"Sep-29-2000 ad">:1
    ENDDEFINE calendar_deviation
    ENDDEFINE calendar
    Note: Gregorian date specified in the deviation should correspond to one of
    29th, 30th or 31th days of the hijrah calendar.
    3. Run the NLS Calendar Utility lxegen to register your modification to Oracle calendar
    system, this utility generates lxecalah.nlb file in the same directory mentioned above.
    4. startup the database.
    The same procedure can be followed to subtract days, but number specified in the
    deviation_data should be greater than 10.
    <e.g: 11 --> subtract one day, 12 --> subtract two days ...etc>
    References
    Hope this helps
    Regards
    Grant Ronald
    Forms Product Management

  • Need to convert  Date from calendar to String in the format dd-mom-yyyy

    Need to convert Date from calendar to String in the format dd-mom-yyyy+..
    This is absolutely necessary... any help plz..
    Rgds
    Arwinder

    Look up the SimpleDateFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    Arwinder wrote:
    This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Get date from Calendar Promt

    Hi Experts,
    Is it possible to get date from Calendar Prompt when operator is "greater then or equal to". In this setting I can not set presentation variable for prompt, why? There is other way to get selected date?
    Thanks in advance for any suggestion
    Regards,
    Esk

    Eskarina wrote:
    Hi Experts,
    Is it possible to get date from Calendar Prompt when operator is "greater then or equal to". In this setting I can not set presentation variable for prompt, why? There is other way to get selected date?
    Thanks in advance for any suggestion
    Regards,
    EskThe reason the Set Variable piece disappears is because a presentation variable cannot contain multiple values. If you want to perform a calculation on a date to filter your report, do this:
    1) Keep the Operator as "is equal to/is in."
    2) Now set your PV to what you want.
    3) In your report, build a CASE statement or use the TIMESTAMPADD function to make whatever calculation you want.
    Example: Let's suppose you wanted to filter your report for all Sales Dates "greater than or equal to" the prompt selection. You would set the date prompt to "equal" a date a user selects and then save it to your Presentation Variable, say pv_SalesDate.
    Now in your report on your Sales Date column, put a filter like this:
    tablename."Sales Date" >= '@{pv_SalesDate}'
    This will achieve what you are looking for.

  • How to import or sync Exchange server data like Calendar, Contacts with a web application or web service

    How to import or sync Exchange data like Calendar, Contacts with a web application or web service.
    1. Is there any API to import contacts and calendar (tasks and events) from exchange server to my calendar in web application using web services or http request. the user would have provided the username and password for his exchange account.
    2. Is there any licensing involved to communicate with exchange server for its data.
    thanks in advance 

    I am bit lost here; i have my exchange credentials, how (or) can i use the above mentioned solution for windows application or web services. can you please point in the right direction. my requirement is this: how to sync exchange data with a third party
    app or webapp(my development) using EWS. how to start with, starting point and steps to do[just overview ;)].

  • Date to Calendar Conversion

    I want to convert following class file from Date to Calendar
    pls guide me how shall i go about it
    package com.utility;
    import java.util.Date;
    public class ConstDate extends Date {
         public ConstDate(Date d)
            super(d.getTime());
        public ConstDate(long time)
            super(time);
        public void setTime(long time)
            throw new UnsupportedOperationException("Can not set time on ConstDate");
        public static ConstDate make(Date date)
            return (date instanceof ConstDate) ? (ConstDate)date : new ConstDate(date);
    }when i tried to do it said i need to implement the abstract methods, i want to know how can i go about doing the same too
    thanks in advance
    regards
    Prad

    Great, but the demand is to change from date to calendar so how can i extend it from interface i have made something like this
    import java.util.Calendar;
    public interface AbstractConstCalendar{
         public abstract Calendar add(int i, int j);
        public abstract Calendar computeFields();
        public abstract Calendar computeTime();
    Note: i just changed the above class file name from ConstDate to ConstCalendar
    how can i call this in above ConstCalendar Class, will this help
    regards
    prad

  • I have a 4s...today, for no apparent reason, I am missing data including, calendar appts, notes, contacts and maybe other things that I am not aware of right now.  I did nothing to cause this.  Any ideas on how to restore?

    I seem to have lost a significant amount of data from calendars (ll appts are gone), notes (a good percentage are gone) and contacts (more than 50% are gone).  I have done nothing to cause this.  Any ideas how I might restore everything?

    try turning the phone off and then back on it worked for me.

  • I would like to mark data on my iPhone / iPad as private or hide it. Is it possible? I could do it on my Palmpilot. Any data - addresses, calendar entries, files, anything could be hidden on the palm pilot. It'd be great to see this facility on apl pdts

    I would like to mark data on my iPhone / iPad as private or hide it and only unlock it with a different password. Is it possible? I could do it on my Palmpilot. Any data - addresses, calendar entries, files, anything could be hidden on the palm pilot. It'd be great to see this facility on apple products.

    I know what you meant. As I said, it's not possible to do so on the iPhone. Of course Apple could add such a feature to a future version of iOS, it's only software, but so far they haven't. You can suggest such a feature to Apple here: http://www.apple.com/feedback/iphone.html

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • Display in a date picker (calendar)

    Hello,
    I have a date picker when i press a button, to choose a date from calendar. But some months are displayed with the year too, like November 2009, June 2009, and in this image i uploaded, in case of September only the month is displayed.. i don't know why the year does not appear. And not just in case of September, but December too.
    Any help?
    Thanks!
    I use Developer 2000 (Forms 5)
    Edited by: Roger22 on 22.09.2009 09:39

    Maybe it is just because there is no space enough to display both month and year. Is it possible to increase the width of the calendar box ?
    Francois

  • Regarding sql function error  for Hijri date to Gregorian date

    Hi ,
    I want to convert Hijri date format into Gregorian date format . i write the script with  sql function  like this
    $Hijri_Date = '16/04/1428';
    $Gregorian_Date = sql('DS_REPO','SELECT CONVERT(DATE,[$Hijri_Date],131)');
    print($Gregorian_Date);
    here $Hijri_Date data type is varchar and $Gregorian_Date data type is date.
    but  I am getting error like
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     ODBC data source <UIPL-LAP-0013\SQLEXPRESS> error message for operation <SQLExecute>: <[Microsoft][SQL Server Native Client
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     10.0][SQL Server]Explicit conversion from data type int to date is not allowed.>.
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     Function call <sql ( DS_REPO, SELECT CONVERT(DATE,16/04/1428,131) ) > failed, due to error <70401>: <ODBC data source
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     <UIPL-LAP-0013\SQLEXPRESS> error message for operation <SQLExecute>: <[Microsoft][SQL Server Native Client 10.0][SQL
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     Server]Explicit conversion from data type int to date is not allowed.>.>.
    7868     5812     RUN-053008     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    please help me out to solve this problem .
    Please suggest any other solution to convert hijri date format to gregorian date format.
    Thanks&Regards,
    Ramana.

    Hi ,
    In Data quality there is no inbuild function for converting hijri date to gregorian date .  we have the function for converting julian date to gregorian date.
    Thanks&Regards,
    Ramana.

  • Localdefinitions.xml and format date for Calendar Prompt

    HI!
    1. I change in localdefinitions.xml all dateformats for my locale
    2. I restarted my BI
    3. no effects
    why?

    yes, I restarted presentation server and oc4j.
    but has no effects.
    date prompt has strange behaviour...
    for Administrator user
    in English locale
    default format YYYY-MM-DD
    after change date by calendar, it has M.D.YYYY format
    in my locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format
    for other users
    in English locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format
    in my locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format

Maybe you are looking for

  • Network Shared Hard Drive Mac/PC

    Not really sure where to start this topic, but this seemed a good place to start. Like many of us out there, I have tons GB's of music, video, and pictures stored and backed-up. Well, after doing some research and some hard decision making I bought a

  • Playing sound over network file

    Hello,          I have swf file in my domain which has to play sound file that is located over the network. say my domain is http://mydomain.com/play.aspx which hosts the swf file. This swf file plays a sound thats is located at \\SERVERNAME\PATH\xyz

  • PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables

    Dear ALL, My O/S is Redhatlinux 5.2 and i had Migrated my Oracle databse to 11g2. But after that while i am retrieving records through dblinks from one of my other Oracle 9.2.0.8 databse it's throwing the error : PL/SQL: ORA-22992: cannot use LOB loc

  • Turkish character in ipod mini

    hi i am from Turkey and i am trying to copy my notes to my ipod mini.but when i copy them i cant read some characters from my ipod.because these characters are like ç,ş,ğ.are there anybody who knows how to solve this problem

  • The Adobe Marriage is Over

    Just want to put this out there. In the ancient days, when a husband and wife were through, the man would publicly say to his wife, "I divorce you, I divorce you, I divorce you.", three times, and the covenant was broken. I've been faithful to Adobe