Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Number of days between dates Post Reply Post New Topic
Author Message
sophie1888
Newbie
Newbie


Joined: 15 Jun 2011
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote sophie1888 Replybullet Topic: Number of days between dates
     Posted: 15 Jun 2011 at 12:42am
I am new to Crystal Reports and have been asked to create a report that shows the age of open calls in a queue.
 
I have the dates these calls were logged but now need to put the number of days they have been open for (up to today's date). Is a formula required? I know this is probably easy but if you don't know you don't know! Appreciate any help
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 15 Jun 2011 at 2:15am
doing this quick but it would be

datediff('d',#OpenDate#,CurrentDate)

did you want to calculate with Saturdays and Sundays? if not, you will need to subtract the sundays and saturdays.    
datediff('d',#OpenDate#,CurrentDate) -
DateDiff ("ww", #OpenDate#,CurrentDate, crSaturday) -
DateDiff ("ww", #OpenDate#,CurrentDate, crSunday)

I think that looks right, but I would need to test, been a while since I have worked with datediff.


IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 15 Jun 2011 at 2:16am
datediff('d', {startingdate}, {endingdate})

EDIT:

Whoops! took too long and you beat me to it, LOL


Edited by FrnhtGLI - 15 Jun 2011 at 2:17am
|< /\ '][' ( )
IP IP Logged
sophie1888
Newbie
Newbie


Joined: 15 Jun 2011
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote sophie1888 Replybullet Posted: 16 Jun 2011 at 3:51am
Thanks, I will give it a go.
 
I take it I enter the date of the first open call in the #OpenDate# field?
IP IP Logged
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