Skip to main content
September 14, 2020

How to check if time period is the last month in a quarter?

  • September 14, 2020
  • 1 reply
  • 0 views
Originally posted by Yan Savinsky

How to check if time period is the last month in a quarter in the Business Rule?

 

Thanks in advance.

 

Yan Savinsky

    1 reply

    Newcomer
    October 11, 2021

    Hello Yan,

    There is no direct api to check for this (although there is one to check IsLastPeriodInYear), but the following line of code will work:

    If api.Time.GetPeriodNumFromId(optional TimeID) Mod 3 = 0 Then