Solved

Crystal Reports convert time

Posted on 2014-09-29
3
186 Views
Last Modified: 2014-09-29
Brain fried, easy one here..
If I have 5:30 in a time format in CR,  result of 2 time calculations (5 hours and 30 minutes)
hour can I convert that to 5.5 in number format.
0
Comment
Question by:BKennedy2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40350352
Convert time to seconds then divide by 3600

It is a TIME field or a string?

mlmcc
0
 

Author Comment

by:BKennedy2008
ID: 40350370
It is a time field.
I am thinking maybe this...Trying it now...

Local numbervar NewH;
Local numbervar NewM;
NewH:= Hour(TotalTime);
NewM:= (minute(totalTime)/3600);
DecimalResult = HewH + NewM
0
 

Author Comment

by:BKennedy2008
ID: 40350389
I have it:
TotalInTime:= time((NewEndTime- EditStartTime));
local numbervar NewH;
Local numbervar NewM;

NewH:=Hour(TotalInTime);
NewM:=NewH + (Minute(TotalInTime)/60);

Thanks for pointing me in the right path
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question