Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Determine the total hours between two Dates Post Reply Post New Topic
Author Message
Douang
Newbie
Newbie


Joined: 15 Nov 2011
Location: United States
Online Status: Offline
Posts: 12
Quote Douang Replybullet Topic: Determine the total hours between two Dates
     Posted: 14 Mar 2013 at 5:45am
I created a formula within my crystal reports to determine the total hrs between two datetime fields.
 
Datediff(minute,{StartTime}, {EndTime}) / 60.0
 
When I compiled the formula, I got error saying "Not enough arguments have been given to this function"
 
Thank you in advance for your help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Mar 2013 at 6:57am
it is different syntax from sql.
use 'n' to indicate minutes
 
datediff('n',{StartTime}, {EndTime}) / 60.0


Edited by DBlank - 14 Mar 2013 at 6:57am
IP IP Logged
Douang
Newbie
Newbie


Joined: 15 Nov 2011
Location: United States
Online Status: Offline
Posts: 12
Quote Douang Replybullet Posted: 14 Mar 2013 at 7:09am
Thank you very much!
 
That did the trick!
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