Project and Portfolio Management Practitioners Forum
cancel

How to determine if a milestone date is within the current financial year

Highlighted
patrick-sa
Super Contributor.

How to determine if a milestone date is within the current financial year

Hi,

 

I'm developing a custom dashboard and I want to determine if a milestone date ( scheduled end date) falls within the current financial year.Our fiscal year start on the 1st of April and end on the 30th March.Any query of function to do this will be much appreciated.

 

Thanks,

Patrick.

1 REPLY
Erik Cole
Acclaimed Contributor.

Re: How to determine if a milestone date is within the current financial year

Your fiscal years should be in ppm_fiscal_periods (where period_type = 6 I think) so you could compare the scheduled end date with that table to determine which fiscal year applies:

select ts.task_schedule_id,ts.sched_finish_date,fp.long_name
from wp_task_schedule ts
join ppm_fiscal_periods fp on (ts.sched_finish_date between fp.start_date and fp.end_date and fp.period_type = 6)