## HOW TO READ CURRENT PERIOD BY USING FORMULA Contributor

## HOW TO READ CURRENT PERIOD BY USING FORMULA

Hi,

In one module i want to read current period.Can you please suggest me what formula i use

Foe suppose we are in jan-19.I want to read current Period(Jan-2019) in Filter module.

Regards,

Uma

1 ACCEPTED SOLUTION

Accepted Solutions  Moderator

## Re: HOW TO READ CURRENT PERIOD BY USING FORMULA

The function you need is CURRENTPERIODSTART() which takes the setting defined in Time. Since CURRENTPERIODSTART() returns a date, you can convert this to a Period with the following formula PERIOD(CURRENTPERIODSTART()).  If you really want to be slick, you can create a module defined by Time, call it Time Filters, and create a line item (Is Current Month?) with a format of Boolean with this formula: ITEM(Time) = PERIOD(CURRENTPERIODSTART()). This gives you the ability to check if the month is defined as the current period month (if .Time Filters'.'Is Current Month?' then ...... else .....).

Hope this helps,

Rob

2 REPLIES 2  Moderator

## Re: HOW TO READ CURRENT PERIOD BY USING FORMULA

The function you need is CURRENTPERIODSTART() which takes the setting defined in Time. Since CURRENTPERIODSTART() returns a date, you can convert this to a Period with the following formula PERIOD(CURRENTPERIODSTART()).  If you really want to be slick, you can create a module defined by Time, call it Time Filters, and create a line item (Is Current Month?) with a format of Boolean with this formula: ITEM(Time) = PERIOD(CURRENTPERIODSTART()). This gives you the ability to check if the month is defined as the current period month (if .Time Filters'.'Is Current Month?' then ...... else .....).

Hope this helps,

Rob Contributor

## Re: HOW TO READ CURRENT PERIOD BY USING FORMULA

Hi Rob,

Ya that's correct. Its working fine.