Topic
• 4 replies
• Latest Post - ‏2014-07-01T07:46:36Z by Shafeeq AM
moob
2 Posts

# Pinned topic How to configure business days in focal point

‏2013-03-21T21:04:11Z |
Hello, a customer wants a date attribute to automatically calculates a specific date based on the date that the record element is created.

Let's call the date attribute "day 41". Day 41 should be 41 "business days" from the date that the element gets created.
For example if I created a record element on March 21, the day 41 would be may 17.
Can focal point handle this logic?
2 attributes date and text?
what is formula for text and default for date?

Also can FP be setup to calculate the business days if we provide a list of holiday days?
Updated on 2013-03-26T17:29:46Z at 2013-03-26T17:29:46Z by SystemAdmin
269 Posts

#### Re: How to configure business days in focal point

‏2013-03-26T17:29:46Z
There may well be a simpler solution but you could try this:

Date Attribute1: Created Date
Integer Attribute1: ='Date Attribute1'
Integer Attribute2: ='Integer Attribute1' + 984 <<<984 is 24 hours * 41 days>>>
Date Attribute2: ='Integer Attribute2'

However, this is calender days and not business days.
• Shafeeq AM
155 Posts

#### Re: How to configure business days in focal point

‏2013-07-01T13:19:17Z
There may well be a simpler solution but you could try this:

Date Attribute1: Created Date
Integer Attribute1: ='Date Attribute1'
Integer Attribute2: ='Integer Attribute1' + 984 <<<984 is 24 hours * 41 days>>>
Date Attribute2: ='Integer Attribute2'

However, this is calender days and not business days.

Hi,

A working example of a Work days aware regex formula which calculates End Date using a calendar stored in text attribute.

Formula used to achieve this:

WorkDaysCE =('WorkDays'-1)
EndDateRE  ='StartDate'  +"([!\d\-\/]*)(#[\d\-\/!]+){"+  'WorkDaysCE'  +"}(#[\d\-\/]+)"
EndDate    =regexp( regexp('!Calendar2013-2015!textvalue''EndDateRE') ,"[\d\-\/]+\$" )

StartDate, WorkDays are user input attributes.
EndDate displays computed End Date.
!Calendar2013-2015!textvalue', WorkDaysCE and EndDateRE are hidden attributes for calculation

The key to this is the Calendar
!Calendar2013-2015!textvalue', = The textvalue attribute in element Calendar2013-2015 (in another module constants) stores the calendar for 2013,2014,2015, with workdays prefixed with # and holidays with !. The date format is set at the workspace level (cannot be user defined).

Example Syntax for : !1/1/13#1/2/13#1/3/13#1/4/13!1/5/13!1/6/13#1/7/13#1/8/13...................... Workspace Date Format is English US.

Regards,
Shafeeq

#### Attachments

Updated on 2013-07-01T13:28:09Z at 2013-07-01T13:28:09Z by Shafeeq AM
• SimonVaughan
6 Posts

#### Re: How to configure business days in focal point

‏2013-11-13T20:08:36Z

Hi Shafeeq, how easy would it be to adapt this approach to calculate the number of business days between either two manually entered  date attributes or two date attributes that hold expressions to calculate the dates? Regards, Simon

• Shafeeq AM
155 Posts

#### Re: How to configure business days in focal point

‏2014-07-01T07:46:36Z

Hi Shafeeq, how easy would it be to adapt this approach to calculate the number of business days between either two manually entered  date attributes or two date attributes that hold expressions to calculate the dates? Regards, Simon

Hi Simon,

The count expression counts cells in a timegrid, but does not give count of text. Maybe, request an RFE for this usecase...

Regards,
Shafeeq