Register

Get value of Day(numerical) from Timescale Day

gaurav_sharma-bng
Certified Master Anaplanner

Get value of Day(numerical) from Timescale Day

Hi Team,

 

I have a module in which the Timescale is Days. Now I need to get the Day from the date. E.g. for a time period 26 Jul 2015, I want to get 26 as my day. Could you please guide me on how to do that.

 

dayCapture.PNG2.png

4 REPLIES 4
ArunManickam
Master Anaplanner/Community Boss

Re: Get value of Day(numerical) from Timescale Day

Please use the DAY() function.

 

https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/DAY.html

 

Create a line item - number formatted and use the formula DAY(START()) in your moudule with timescale Day.

 

Thanks

Arun

ChrisHeathcote
Community Boss

Re: Get value of Day(numerical) from Timescale Day

An alternative approach is to use a combination of ITEM and DAY.

 

=Day(ITEM(Time))

 

This formula will query the current time period and then return the day value formatted as a NUMBER. 

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA
ArunManickam
Master Anaplanner/Community Boss

Re: Get value of Day(numerical) from Timescale Day

No, the DAY function can only accept date as input argument. So it does not accept the time list members.

 

It could be something like this..DAY(START(ITEM(Time))), I prefer DAY(START())

 

Thanks

Arun

ChrisHeathcote
Community Boss

Re: Get value of Day(numerical) from Timescale Day

@ArunManickam 

Yes, you are correct. 

 

ITEM will return a time period format NOT a date format which would not be compatible with DAY().

In that case I would also recommend your solution - 

 

DAY(START())

 

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA