Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cents not showing correctly in formula - time * rate of labor 1

Status
Not open for further replies.

glennjh66

Technical User
Jul 19, 2011
5
AU
Hi All,

Novice doing his head in here. I know I'm close but no cigar just yet.

Here is the current formula as it stands

I have a formula (@CONVERTED TIME) to convert hours and minutes to a decimal.

Code:
({tvw_SOTimeLogsAmountForReports.LogHours} + ({tvw_SOTimeLogsAmountForReports.LogMinutes}/60))

This outputs correctly: .57 for 34 minutes

I then have this for the formula (@LABOR VALUE) to provide a total dollar value. LogReasonLaborRate is a currency field

Code:
ToText ({@CONVERTED TIME}*{tvw_SOTimeLogsAmountForReports.LogReasonLaborRate},2)

The Labor Rate is $120. The correct value Im after is $68.40 (.57*$120) however I'm not getting the cents. The output is $68.00.

I know its a minor thing somewhere. Thanks in advance.

Glenn
 
Are you sure time is really 0.57

If you divide 68.00 by 120 you get 0.5666666666.... recurring which if displayed to 2 decimal places is 0.57

Display your labour rate to 5 decimal places and see what happens.

If you want calculation to use 0.57 rather than the true numerical result you will have to round number first.

Do not have Crystal pen but I think formula should be

Code:
ToText (Round({@CONVERTED TIME},2)*{tvw_SOTimeLogsAmountForReports.LogReasonLaborRate},2)

Ian
 
Hi Ian,

Thanks so much. I knew it was something simple.

Cheers
Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top