Skip to main content
Solved

Calculate a Date Based on the Number of Workdays from a Given Date

  • September 5, 2024
  • 2 replies
  • 66 views

Forum|alt.badge.img+4

I use the work_time_calendar_api.get_work_days_between() function in several of my SQL scripts, and it works great. Is there a way, using the work time calendar, to calculate a date from a given date with a delta?

For instance (pseudocode): get_work_days_between(calendar,‘2024-09-03’,’2024-09-05’) will return 2 in my environment.

Is there a function that exists that will allow a date argument ‘2024-09-03’ and a variable argument of ‘2’ and return the value of ‘2024-09-05’?

thanks!

Eric

Best answer by dsj

Hi @emiller3061 

 

I think Work_Time_Calendar_API.Get_End_Date(calendar_id_, start_date_, duration_); would get you the result.

 

/Damith

2 replies

dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 905 replies
  • Answer
  • September 5, 2024

Hi @emiller3061 

 

I think Work_Time_Calendar_API.Get_End_Date(calendar_id_, start_date_, duration_); would get you the result.

 

/Damith


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 9 replies
  • September 5, 2024

Thank you!