Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem with date range Post Reply Post New Topic
Author Message
Terta
Newbie
Newbie
Avatar

Joined: 14 Sep 2011
Location: Sweden
Online Status: Offline
Posts: 1
Quote Terta Replybullet Topic: Problem with date range
    Posted: 14 Sep 2011 at 2:25am
I have problem with my formula.
 
So far it works fine, but I need to add 1 day if "enddate" is a Saturday and add 2 days if "enddate" is a Sunday.
 
local DateTimeVar d1 := {startdate};
local DateTimeVar d2 := {enddate};
DateDiff ("d", d1, d2) -
    DateDiff ("ww", d1, d2, crSaturday) -
    DateDiff ("ww", d1, d2, crSunday)
 
This is workingdays, and if they work on Saturday or Sunday, I need to add those days to enddate.
 
/Terta
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.