Hijri date converter for Dynamics NAV

Photo credit: radiant guy
Need to convert Gregorian to Hijri dates in Dynamics NAV?
The Islamic calendar or Hijri calendar is a calendar based on the cycles of the moon, used to date events in many Muslim countries and to determine the correct day on which to celebrate Islamic holy days and festivals.
A question appeared on the Navision newsgroup some years ago asking how to go about converting Gregorian to Hijri dates in Dynamics NAV, so I set about writing some code to achieve this.
I though the new year may be an appropriate time to repost that code for anyone who needs it.
You can download the Hijri Date Management codeunit here.
Example function calls:
MESSAGE(Date2Hijri(010110D,0));
This message window would show: 15/1/1431
MESSAGE(Date2Hijri(010110D,1));
This message window would show: Friday 15 Muharram 1431 A.H.









No Comments
Leave a response