Print Page | Close Window

How to convert a time field in seconds

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13950
Printed Date: 20 Apr 2025 at 12:01pm


Topic: How to convert a time field in seconds
Posted By: HowieRox
Subject: How to convert a time field in seconds
Date Posted: 02 Aug 2011 at 8:11am
I need to be able to convert a summary field to hours and minutes as follows:

Field in database:  seconds

I'm running a rolling time sheet for a generic time and attendance application we have installed.

I need to summarize the seconds from each day in the group footer as a SUM and then convert the SUM to hours and minutes.  I have the individual days being converted to hours and minutes displayed using totext functions, but I can't figure out how to do the same thing to the summary field.

Hopefully I'm just missing something simple...  Please help!!



Replies:
Posted By: hilfy
Date Posted: 02 Aug 2011 at 11:54am

Instead of just clicking on the Summary button to create your summary, create a formula that does the same thing.  You'll need to have a group on the Date and the formula will look something like this:

sum({table.seconds}, {table.date})
 
You can then convert this formula the same way that you're converting your other fields.
 
-Dell 


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: HowieRox
Date Posted: 03 Aug 2011 at 2:45am
Thanks - problem solved. I knew it would be something easy. I've used Crystal on and off for about 10 years, but never got too in depth. Thanks for the response so quickly.

-Brian



Print Page | Close Window