function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nawazheebanawazheeba 

Retrieving the Date from Business Day Field

Hi,

 

I have a Business Day(pick list 1 to 22) and Business Month(pick list Jan to Dec) field.  Based on the this two fields I need to genate the date.

 

Can anyone please suggest How can we achieve this.

 

Nawaz.

AmitSahuAmitSahu
Use newInstance() date method. check in apex guide you will find more info. Just search in the PDF about date methods ... Hope this will help...else let us know ..will try some other way
nawazheebanawazheeba

I mean business days, it has to exlcude weekends.

AmitSahuAmitSahu
I am still confused about your requirement... You are saying generate the dates ?? What does that mean...or you need a count of business days..
nawazheebanawazheeba

Hi J,

 

I have one pick list Field Business Day with values 1-22

one more pick list field Month with Values Jan - Dec

One more field Date- if user enters 20 in the business day and Mar in the month field, this date field should be be 20th business day of mar with weekends excluded.

 

Thanks,

Nawaz.

AmitSahuAmitSahu
sent a code sample .. may need changes for your requirement but should help.... Please check your messages.
nawazheebanawazheeba

Hi J,

 

I need to retrieve the date based on business day.

 

Thanks,
nawaz.

AmitSahuAmitSahu
The code I sent you in PM should work have you checked that? The current code counts the days between two dates but you can just take the part where it gets the weekdays only.
nawazheebanawazheeba

Hi J,

 

I am unable to get the solution

 

Nawaz.