Convert gregorian to hijri date

Hi guyz,
Anyone knows how to convert gregorian to hijri date? Any function module or method?
Thanks,
Usman Malik

Hi Kesavadas,
Check class cl_abap_datfm
method conv_isl_to_greg_formula
It is is not working fine.
25.06.1434    =   06.05.2013   it is wrong.
25.06.1434    =   05.05.2013   it is Correct.
Please give a solution for that issue.

Similar Messages

  • Convert Gregorian  to Hebrew date

    Hi,
    Is it possible to Convert Gregorian to Hebrew date in Peoplesoft?
    Thanks.

    Hi Kesavadas,
    Check class cl_abap_datfm
    method conv_isl_to_greg_formula
    It is is not working fine.
    25.06.1434    =   06.05.2013   it is wrong.
    25.06.1434    =   05.05.2013   it is Correct.
    Please give a solution for that issue.

  • 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

  • Convert georgian date to hijri date at specific date

    Hi all,
    I'm new in PL/SQL , I use Oracle database 10g in windows xp .
    could any one help and provide me with code that accept any Georgian date
    and convert it to hijri date
    best regard
    new user
    thanks

    the solution would go along the lines of
    to_date(to_char(<date column>,'format model','*NLS_CALENDAR=<code for Georgian>*'),'format model', 'NLS_CALENDAR=<code for Arab/Hijri')
    as per the description of to_date in the SQL reference manual.
    Sybrand Bakker
    Senior Oracle DBA

  • 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.

  • Gregorian to hijri and viceversa javascript

    I have a Javascript for a Hijri / Gregorian calendar.
    I need to get it into Adobe Acrobat PDF.
    The business requirements for this are easy. Just take the script i give you and get it to work in Adobe Acrobat PDF.
    The technical side is tricky. I haven't been able to make it work. When I do it, the conversion works 1 time when you first open the document. then, it only works one way after that. (from gregorian to hijri, never the other way around.)
    1. This MUST be done in Acrobat XI, Not LiveCycle.
    2. I'm using Adobe Acrobat XI Pro. I can't use any other version right now. So this must be able to work on XI and then people need to be able to open and execute this in Reader.
    Here is the code I have written from a HTM file..
    <SCRIPT LANGUAGE="JavaScript">
      function setDateToToday()
        var today = new Date();
        var y = today.getYear();
        var y = today.getYear();
        if (y < 1000) {
            y += 1900;
        document.myform.CYear.value = y;
        document.myform.CMonth.selectedIndex = today.getMonth();
        document.myform.CDay.value = today.getDate();
    // Travis added the following method call to fix the bug where the Hijri date was not set to today by default   
        chrToIsl(0);
    //  LEAP_GREGORIAN  --  Is a given year in the Gregorian calendar a leap year ?
    function leap_gregorian(year)
        return ((year % 4) == 0) &&
                (!(((year % 100) == 0) && ((year % 400) != 0)));
    //  GREGORIAN_TO_JD  --  Determine Julian day number from Gregorian calendar date
    function gregorian_to_jd(year, month, day)
        var GREGORIAN_EPOCH = 1721425.5;
        return (GREGORIAN_EPOCH - 1) +
               (365 * (year - 1)) +
               Math.floor((year - 1) / 4) +
               (-Math.floor((year - 1) / 100)) +
               Math.floor((year - 1) / 400) +
               Math.floor((((367 * month) - 362) / 12) +
               ((month <= 2) ? 0 :
                                   (leap_gregorian(year) ? -1 : -2)
               ) +
               day);
    function mod(a, b)
        return a - (b * Math.floor(a / b));
    function jd_to_gregorian(jd) {
        var wjd, depoch, quadricent, dqc, cent, dcent, quad, dquad,
            yindex, dyindex, year, yearday, leapadj;
        var GREGORIAN_EPOCH = 1721425.5;
        wjd = Math.floor(jd - 0.5) + 0.5;
        depoch = wjd - GREGORIAN_EPOCH;
        quadricent = Math.floor(depoch / 146097);
        dqc = mod(depoch, 146097);
        cent = Math.floor(dqc / 36524);
        dcent = mod(dqc, 36524);
        quad = Math.floor(dcent / 1461);
        dquad = mod(dcent, 1461);
        yindex = Math.floor(dquad / 365);
        year = (quadricent * 400) + (cent * 100) + (quad * 4) + yindex;
        if (!((cent == 4) || (yindex == 4))) {
            year++;
        yearday = wjd - gregorian_to_jd(year, 1, 1);
        leapadj = ((wjd < gregorian_to_jd(year, 3, 1)) ? 0
                      (leap_gregorian(year) ? 1 : 2)
        month = Math.floor((((yearday + leapadj) * 12) + 373) / 367);
        day = (wjd - gregorian_to_jd(year, month, 1)) + 1;
              document.myform.CDay.value = day;
              document.myform.CMonth.value = month;
              document.myform.CYear.value = year;
    function intPart(floatNum){
    if (floatNum< -0.0000001){
               return Math.ceil(floatNum-0.0000001)
    return Math.floor(floatNum+0.0000001)
    function weekDay(wdn){
    // Stubbed this out because we have no interest in showing the days of the week.
      return ""  }
    function chrToIsl(NumberofDays) {
              //alert("Month:" + document.myform.CMonth.value)
              d=parseInt(document.myform.CDay.value)
              m=parseInt(document.myform.CMonth.value)
              y=parseInt(document.myform.CYear.value)
                                                      if ((y>1582)||((y==1582)&&(m>10))||((y==1582)&&(m==10)&&(d>14)))
                                                                jd=intPart((1461*(y+4800+intPart((m-14)/12)))/4)+intPart((3 67*(m-2-12*(intPart((m-14)/12))))/12)-
              intPart( (3* (intPart(  (y+4900+    intPart( (m-14)/12)     )/100)    )   ) /4)+d-32075
                                                                else
                                                                jd = 367*y-intPart((7*(y+5001+intPart((m-9)/7)))/4)+intPart((275*m)/9)+d+1729777
                                                      jd = jd + NumberofDays
                                                      //Stubbed out the weekday/epoch names below to remove them from the HTML page.  jd = epoch time wd = weekday
                                                      //document.myform.JD.value=jd
                                                      //document.myform.wd.value=weekDay(jd%7)
                                                      l=jd-1948440+10632
                                                      n=intPart((l-1)/10631)
                                                      l=l-10631*n+354 
                                                      j=(intPart((10985-l)/5316))*(intPart((50*l)/17719))+(intPart(l/5 670))*(intPart((43*l)/15238))
                                                      l=l-(intPart((30-j)/15))*(intPart((17719*j)/50))-(intPart(j/16)) *(intPart((15238*j)/43))+29
                                                      m=intPart((24*l)/709)
                                                      d=l-intPart((709*m)/24)
                                                      y=30*n+j-30
              jd_to_gregorian(jd)
              document.myform.HDay.value=d
              document.myform.HMonth.value=m
              document.myform.HYear.value=y
    function islToChr( NumberofDays) {
              d=parseInt(document.myform.HDay.value)
              m=parseInt(document.myform.HMonth.value)
              y=parseInt(document.myform.HYear.value)
              jd=intPart((11*y+3)/30)+354*y+30*m-intPart((m-1)/2)+d+1948440-385
              jd = jd + NumberofDays
              //Stubbed out the weekday/epoch names below to remove them from the HTML page.  jd = epoch time wd = weekday
              //document.myform.JD.value=jd
              //document.myform.wd.value=weekDay(jd%7)
                                                      if (jd> 2299160 )
                                                                 l=jd+68569
                                                                 n=intPart((4*l)/146097)
                                                                l=l-intPart((146097*n+3)/4)
                                                                 i=intPart((4000*(l+1))/1461001)
                                                                l=l-intPart((1461*i)/4)+31
                                                                 j=intPart((80*l)/2447)
                                                                d=l-intPart((2447*j)/80)
                                                                l=intPart(j/11)
                                                                m=j+2-12*l
                                                                y=100*(n-49)+i+l
                                                      else
                                                                 j=jd+1402
                                                                 k=intPart((j-1)/1461)
                                                                 l=j-1461*k
                                                                 n=intPart((l-1)/365)-intPart(l/1461)
                                                                 i=l-365*n+30
                                                                j=intPart((80*i)/2447)
                                                                d=i-intPart((2447*j)/80)
                                                                i=intPart(j/11)
                                                                m=j+2-12*i
                                                                y=4*k+n+i-4716
              document.myform.CDay.value=d
              document.myform.CMonth.value=m
              document.myform.CYear.value=y
    </SCRIPT>
        <FORM NAME="myform">
    <strong>gregorian</strong>
      <select size="1" name="CMonth" onChange="chrToIsl(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
      </select>
    <select size="1" name="CDay"  onChange="chrToIsl(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
      </select>
    <INPUT TYPE="text" NAME="CYear" VALUE="" SIZE="4" onChange="chrToIsl(0);" onKeyUp="chrToIsl(0);" >
      </p>
    <strong>hijri</strong>
    <select size="1" name="HMonth" onChange="islToChr(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
      </select>
    <select size="1" name="HDay" onChange="islToChr(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
      </select>
    <INPUT TYPE="text" NAME="HYear" VALUE="1430" SIZE="4" onChange="islToChr(0);" onKeyUp="islToChr(0);">
    <script>
    setDateToToday();
    </script>
    I just need the functionality if it can be achieved with a better script.

    Hi,
    Issue 1 - it doesn't convert to Hijri date, only Julian date for Hijri (doesn't show the Hijri date but does show two Gregorian dates).
    I am sorry I don't actually know how to convert between the dates, I only used the code that you provided in your initial post and called that from the Acrobat PDF form,
    The sample I provided is how to call the code above using Acrobat.
    Issue 2 -  I want to be able to have the dates default (if blank) to today's date
    That is easy enough to do in that you just use JavaScript to get the current date and time using the Date object.
    And it can convert dynamically as you could just attach the code to the change or exit events of the objects that you are using to select the date and run the code.
    I kept my sample simple and used buttons so it is easy for everyone to see how the code is called as you can look at the preferences of each button to see the JavaScript that is used.
    Regards
    Malcolm

  • 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

  • Arabic Hijri Date

    I want to store and display dates of my application in Arabic Hijri style. Is there any function that converts american date into Arabic Hijri date...?
    Or any other sollution for it..?
    Note: I m using American_america.we8iso8859p1 character set and also need the sollution in the same...

    Try this
    alter session set NLS_CALENDAR="Arabic Hijrah" ;
    When I grepped for Hijri, I got only the above one for Hijri, Hijra & Hijrah.
    Also worth trying "Arabic Hijri".
    Thanks,
    Vinod.

  • Convert Char. to Master Data

    Hello Experts,
    I have a char. in the system. And I would like to convert it to  master data. Because I am going to add to an attribute.
    What should I do?

    Hi ,
    1- Go to Transaction RSD1 and Enter the technical name of your Info Object and select the change option .
    2- go to Master Data/ Text Tab of Info object .
    3- Select the check box With Master Data and if you need text of master data then select the With Texts check box also .
    You can select short ,medium and long text as per your need .
    4- Now you can see that Attribute Tab has been appeared for the Info object . You can enter display or navigation attribute as per your requirement .
    Do not forget to re-activate the info object again .
    Note : If your object is already used in Info provider , system will not allow to make above changes . So First remove it from Info provider and then do this changes .
    Hope it helps .
    Regards
    Vikas Sharma
    Robert Bosch

  • Convert string to a date

    Gurus,
    It would be highly appreciable if you could help me in knowing how to convert a string to date in obiee. I know we need to use CAST function. I don't have enough material to figure it out myself.
    Awaiting a reply.
    Thanks.

    Nico - Thanks for the link, this is very helpful. Please tell me what's wrong in the following code. Am enlcosing the code and the error.
    Code 1 :
    CAST(CAST('31-OCT-'||CAST(YEAR("Dim - MBS Loan"."CLOSING DATE") AS CHAR) AS CHAR) AS DATE)
    Error 1:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 25137, message: ORA-25137: Data value out of range at OCI call OCIStmtExecute: select distinct D1.c1 as c1, D1.c2 as c2, D1.c3 as c3,
    Code 2 :
    CAST('31-OCT-'||SUBSTRING(CAST(YEAR("Dim - MBS Loan"."CLOSING DATE") AS CHAR),3,2) AS DATE)
    Error 2:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1840, message: ORA-01840: input value not long enough for date format at OCI call OCIStmtExecute: select distinct D1.c1 as c1, D1.c2 as

  • How to convert from line chart data to CSV format

    Hi ,
    I am using Flex 3 and AS.
    I am getting data from MS SQL and display the data as line
    chart this is ok.
    But i want to convert this line chart data to CSV or .xsl
    format.I find one example in fourms the from data grid to CSV
    For this URL is
    http://www.abdulqabiz.com/blog/archives/flash_and_actionscript/datagriddataexporter.php
    But i want Line chart to CSV.Please help me.

    Line chart is a just a visual representation of some data
    that's sitting in your database. Isn't it? You load this in Flex,
    probably using HTTPService class, and pass it to some chart object.
    Now when use says that she needs it in CSV format, you're
    gonna have to send another request to the server to produce the
    same data, convert into CSV or XLS format and let user download it.
    Of course, if use doesn't want to download, you don't have to
    go to the server, at least for CSV format. You can convert the same
    data that used plot the chart to convert to CSV.
    Am I missing something here?
    ATTA

  • Problem in converting the String to Date with time zone GMT

    Hi,
    When I tried to convert the string 12/05/2009 to Date, the time zone is set to BST.On the other hand, for the date 12/12/2009, the time zone is set to GMT. What should I do to get the time zone as GMT all the time.?
    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
    String dateString = "12/05/2009";
    System.out.println(myDate.toString());

    I think you are all missing the point. java.util.Date objects always alway always store the date as the number of milliseconds since 1/1/1970 UTC so the only TimeZone they have its the implicit UTC. When you use the Date.toString() method the toString() method gets the default time zone from your environment and formats the data accordingly. This means that the same Date object will, by default, produce a different result for France and Australia and the US.
    So, if you have the date "12/5/2009" as a String then to convert it to a java.util.Date you must specify what TimeZone is implied. If it is your system time zone then you can just create a SimpleDateFormat object with the correct format and then use the parse() method to create the java.util.Date object and this will automatically be converted to UTC. If the date String represents some other time zone then you must explicitly set the time zone of the SimpleDateFormat object before parsing the string.
    The same approach applies when converting a java.util.Date object to a String. If you want anything other than your system time zone then you must explicitly tell the SimpleDateFormat what time zone you want the result formatted for.

  • Error when converting time stamp in date time time zone CST  in IC

    Hi Experts,
    We have recently upgraded from CRM 5.0 to CRM 2007. We are using IC WEB Employee interaction center.
    so when agent create service ticket in interaction center and close the ticket on same day we are getting an error saying Error when converting time stamp in date time time zone CST.
    we thought there may be problem while installing SAP CRM by basis team in time zone, but we did not find any problem.
    So please advice how to resolve this issue.
    Regards,
    Teja

    Hi Teja,
    I saw a similar message, and it was resolved by adding a timezone to the user profile defaults tab in SU3. I believe the system has been configured to convert between users' timezone and the system timezone, therefore it needs to know each users' timezone.
    Regards,
    Simon.

  • Cannot convert from java.util.Date to java.sql.Date

    In the below code am trying to get the current date and 60 days prior date:
    Date  todayDate;
              Date  Sixtydaysprior;
              String DATE_FORMAT = "MM/dd/yy";
              DateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
             Calendar cal = Calendar.getInstance();
              todayDate = sdf.parse(sdf.format(cal.getTime()));
              cal.add(Calendar.DATE, -60);
             Sixtydaysprior = sdf.parse(sdf.format(cal.getTime()));I have imported following files:
    <%@page
         import="java.util.Calendar,
                   java.text.SimpleDateFormat,
                   java.text.ParseException,
                            java.util.*"
    %>Shows up following error msg:
    Type mismatch: cannot convert from java.util.Date to java.sql.Date
    Thanks.
    Edited by: MiltonDetroja on May 22, 2009 11:03 AM

    Shows up following error msg:
    Type mismatch: cannot convert from java.util.Date to java.sql.Date
    I don't think this exception is thrown from the portion of code you have shown. As clearly specified in exception message, you cannot cast an instance of java.util.Date to java.sql.Date. you will need to do something like this
    java.util.Date today = new java.util.Date();
    long t = today.getTime();
    java.sql.Date dt = new java.sql.Date(t);

Maybe you are looking for

  • Error while copying a DTP

    Hi Experts, Its a simple yet confusing error to me. I copy a DTP which has some filters defined. I get an error saying both the DTPs can not have the same filter criteria - if its a Delta DTP. I say ok and try to change the filter values , interestin

  • Using the same apple ID

    I've recently lost my iphone and the problem is that I was using the same apple Id of my friend. Is there anything I can do to bring my videos and photos back? As I never did any back up of them

  • How to view hidden window file in a memory card?

    I am connecting a memory card to a mac But i cant view the hidden files in it It is a window file Can anyone help ?=)

  • Is there any query analyser in sap

    Hi, I would like to know if is any query analyser in SAP like the we have in MS-Sql Server, so that I could paste a query from abap program and check the results instead of using abap debugger. regards Balaji

  • No Data Stored For 0006 in the selected period

    Can any body help to resolve this issue. it is confirm that record exist for employeenumber because i am getting address information for that employeenumber and i want to update only telephone number only for testing. my code is as below:           p