How to get Leap Year from Date in BC D365 via AL

How to get Leap Year from Date in BC D365 via AL:

(1) In this blog we will get to know about the logic for getting leap year from the date. Leap years are years where an extra day is added to the end of the shortest month, February.

(2) There are two ways to calculate the leap year from the date.

(3) The first way, use a directly inbuilt function, provided by Microsoft in the “Type Helper” codeunit, as shown below.

getleapyear in d365 bc

(4) In the above screenshot, IsLeapYear function is used for getting the leap year from the date.

(5) The Second method is to write the logic for getting the leap year, as shown below.

leapyearfunction business central

Reverse or Undo Feature in Transfer Shipment in D365 BC
Report Extension Overview in Business Central D365
Development of Trial Balance Report in BC D365
How to attach Report in Page in D365 BC
Bank Reconciliation Report Development and Format in D365 BC
Power Apps– Microsoft

Leave a Reply