Link to home
Start Free TrialLog in
Avatar of tegronakron
tegronakron

asked on

crystal reports Format sum of datediff to DD:HH:MM:SS

I need to output a formula field to the format DD:HH:MM:SS.  I am calculationg the datediff of a starttime and endtime and then summing the result.  I separated these out into NumDays, NumHours, NumMins, NumSeconds.  Now I want to string these together in this format DD:HH:MM:SS.   My problem is I keep getting 1 instead of 01 if the value is in single digits.  Example  1: 5: 2:56  for 1 day 5 hours, 2 minutes 56 seconds.
I tried the following but it isnt working
Totext({@NumDays},'##') & ":" &
Totext({@NumHours},'##') & ":" &
Totext({@NumMins},'##') & ":" &
Totext({@NumSeconds},'##')
Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of bdreed35
bdreed35
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tegronakron
tegronakron

ASKER

Thanks it worked!