Print Page | Close Window

Change time to Decimal

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8095
Printed Date: 03 May 2024 at 2:18pm


Topic: Change time to Decimal
Posted By: John BIRSA
Subject: Change time to Decimal
Date Posted: 22 Oct 2009 at 11:41am
Hi people,
 
I have a question for yours,
 
well I need change some hours to decimal, cause I canīt sum the hour.
 
So, do yours help me with that?
 
What can I do?     


-------------
Thanks



Replies:
Posted By: lockwelle
Date Posted: 23 Oct 2009 at 7:04am
take you hours and divide by 24.


Posted By: John BIRSA
Date Posted: 23 Oct 2009 at 7:10am
will not let me make that move says:
 
Need a bolean or number here.
 
I guess I need some more, for make that.
 
Will yours help me, please Confused


-------------
Thanks


Posted By: lockwelle
Date Posted: 23 Oct 2009 at 7:21am
what's your code?  that sort of message is usually because the statement is incomplete.
 
You are assigning the value using the := ?  I know it a simple question, but I have made this mistake before...


Posted By: John BIRSA
Date Posted: 23 Oct 2009 at 7:33am
Is for crystan, in visual.
 
I know the statement is incomplete. this is :
                 cstr ({DailyInOut20Oct09_.Entrada}) / 24
 
This is a comun misteake, but I canīt found it,
 
I guess, I need to
state the time as a decimal but i dont know how.


-------------
Thanks


Posted By: lockwelle
Date Posted: 23 Oct 2009 at 8:06am
cstr ({DailyInOut20Oct09_.Entrada} / 24)
 
you are converting a number to a string, you need to divide on the number not the string.
 
hope this helps



Print Page | Close Window