Higri dates:

Hi,
The minimum date in AX is 01/01/1900 (this is also considered as null value).
And the maximum date is 31/12/2154.
The below code helps to select a date less than 01/01/1900 (or) more than 31/12/2154.
static void testHijriDate(Args _args)
{

TransDate dt;
int HijriDt;
int HijriMonth;
str Yr;

CalendarConverter CalendarConverter;
;

dt = 011\2011;
CalendarConverter = new CalendarConverter(PreferredCalendar::Hijri);
HijriDt = CalendarConverter.dayofmth(dt);
HijriMonth = CalendarConverter.mthofyr(dt);
Yr = CalendarConverter.yearStr(dt);

info(strFmt(‘Hijri day %1 – month %2 – Year %3’, HijriDt, HijriMonth, Yr));
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s