Thursday, May 5, 2016

Convert Hijri To Gregorian in ax 2009

date toGregorianDateNew(PAYFDateHijri _hijriDate)
{
    date                ret;
    str                 retStr;
    HijriToGregorian.HijriToGregorian convert;
    CLRObject           clr;        // Define a CLRObject object.
     InteropKind                         interopKind;
   ;
    clr = new HijriToGregorian.HijriToGregorian();
    convert = clr;

    retStr = convert.HijriToGreg(_hijriDate);

    ret = str2date(retstr,321);
    return ret;
}


example :

 toGregorianDateNew("1460/05/13");

Download:

https://drive.google.com/file/d/0ByF76Avzw0r1eFVSUEpiRk9Kdms/view?usp=sharing

No comments:

Post a Comment

Sending Email using X++ Code in D365 F&O/ AX 7 in HTML fomat

  I was just researching on the emailing capabilities in D365 and found that SysINetMail, SysMailer and some of the smmOutlook classes are d...