Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Display number of minutes in HH:MM format Post Reply Post New Topic
Author Message
sanjeewalk
Newbie
Newbie


Joined: 04 Sep 2011
Online Status: Offline
Posts: 1
Quote sanjeewalk Replybullet Topic: Display number of minutes in HH:MM format
    Posted: 05 Sep 2011 at 12:03am

Hi,

I am working on a report in [ASP.NET + VS2008 , Crystal Reports + SQL Server 2008] environment.


I have a data column which returns me number of minutes in integer format.


I need to get total number of minutes for a given emp, which I managed to get using;


1. Add formula field

2. use Change Summary Operation

3. Selected Sum as calculate this summary.


So now I get the total no of minutes in a text object in the report. Next I need to display this in HH:MM which I am unable to find a way.


For ex : Total mins = 73 Should Be 01:13


I have not mastered crystal reports and struggling to get this done...Any help is highly appreciated... Thanks in advance..



Edited by sanjeewalk - 05 Sep 2011 at 12:04am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Sep 2011 at 11:34am
Try something like this:
ToText({minutes}\60, 0) + ':' + ToText({minutes} mod 60, 0)
 
Using the back-slash (\) to divide does an "Integer Divide" which gives you just the integer portion of the division.  "Mod" gives you the remainder from the integer divide.
 
-Dell
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.031 seconds.