Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Duration formula Post Reply Post New Topic
Author Message
Melba
Newbie
Newbie
Avatar

Joined: 11 Apr 2014
Location: United States
Online Status: Offline
Posts: 3
Quote Melba Replybullet Topic: Duration formula
    Posted: 14 Apr 2014 at 9:12am
We recently switched to a new Crystal Enterprise Server that doesn't support the CA PDM date time functions.  Since i can no longer use the datetimediff function, this presents a problem when I am trying to do a duration formula to see how long a ticket was open. Does anyone know of another formula I can use to see the time difference between the open date/time and close date/time?

The date formula I am using is:

DateTimeVar UTC:= DateAdd ('s' , {call_req.open_date} , Datetime (1970,1,1,0,0,0));

DateTimeVar EST:= DateAdd ('h' , -5 , UTC);

If EST in DateTime (year(EST),3,8,2,0,0)  to DateTime (year (EST),11,1,0,59,59)

                then DateAdd ('h' , 1 , EST)

else  EST

The call_req.open_date is the database field for the open date of the ticket.

Thank you!
Melba
IP IP Logged
Melba
Newbie
Newbie
Avatar

Joined: 11 Apr 2014
Location: United States
Online Status: Offline
Posts: 3
Quote Melba Replybullet Posted: 14 Apr 2014 at 9:31am
The Crystal Enterprise Server we are using is SAP Business Objects Enterprise  Version  14.1.0
Melba
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Apr 2014 at 5:08am
DateAdd??? I would think that you want DateDiff, so that you get the number of seconds from 1/1/1970, after that, I think that the rest of the logic is fine.

IP IP Logged
Melba
Newbie
Newbie
Avatar

Joined: 11 Apr 2014
Location: United States
Online Status: Offline
Posts: 3
Quote Melba Replybullet Posted: 24 Apr 2014 at 10:34am
That is the date formula I am using to convert by date from a string to a date format. The datediff will not work in Cystal Enterprise. I am trying to find a replacement for Datediff.
Melba
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 24 Apr 2014 at 10:44am
have you tried: DATE("4/9/2014") ?

it should work according to documentation...then you could use DATEADD
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.047 seconds.