Hello,
i need to calculate date difference between two timestamps (date+time), excluding weekends.
i.e.
startdate = 23-02-2023 15:37:24
enddate = 28-02-2023 07:13:59
Since there is a weekend in between, I expect to have 2,65 as result, and not 4,65.
Can you please help?
This well-known formula does not work, because it's based on date only (without time):
DateTimeVar startdate := {table.startdate};
DateTimeVar enddate := {table.enddate};
Datediff("d", startdate, enddate) -
Datediff("ww", startdate, enddate, crSaturday)-
Datediff("ww", startdate, enddate, crSunday);
Thank you very much in advance.
Regards
Rani