Calculated Fields

by camel

Downloads: 23,627 (9) • Reviews: 4

Version:

1.2.9.4

Updated:

Apr 11, 2011

numbers next to the comma

numbers next to the comma

Postby gringojack » Sat Mar 17, 2012 2:35 am

hi

In some calculated field I get this: "457,458125489"
I only need this: "457,45"
How should I do?
Is there any very detailed wiki available?

I also get that type of message when clicking the "Calculate selected row" button. Should I click the "Clear calc values" button before?
Image
thank you
Salut les Copains!
GPS GARMIN Edge 1030
Mountain biking on:
GIANT Trance 27.5 2/V.A.E Hybrid electric
CycleOps PowerTap
My toy #1: SportTrack3!
gringojack
Donated!
Donated!
 
Posts: 540
Joined: Wed Feb 11, 2009 3:44 am
Location: France

Re: numbers next to the comma

Postby froggyranita » Sun Mar 18, 2012 5:46 pm

Hello, in the Logboook / Properties / Custom Data Fields, look at the Custom Data Fields and the name of the field you are using, and change the "Decimal places" to suit your need ( 2 in you case).

Regards, Pascal
froggyranita
 
Posts: 27
Joined: Sun Feb 12, 2012 7:17 am

Re: numbers next to the comma

Postby gringojack » Mon Mar 19, 2012 2:08 am

numbers come anyway as shown below. Only need the integers or even 2 figures next to the comma
thank you

Image

Image
Salut les Copains!
GPS GARMIN Edge 1030
Mountain biking on:
GIANT Trance 27.5 2/V.A.E Hybrid electric
CycleOps PowerTap
My toy #1: SportTrack3!
gringojack
Donated!
Donated!
 
Posts: 540
Joined: Wed Feb 11, 2009 3:44 am
Location: France

Re: numbers next to the comma

Postby camel » Mon Mar 19, 2012 2:39 am

You can write something like this inside your formulas for fixed decimal places for numbers.

For example:
{Distance}.ToString("N2")

Calculated Fields is built on C#, so there is comprehensive material on internet for it if you are programmer. And if not there is wiki for calculated fields.
Of course I cannot write an wiki about whole programming language :)
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia


Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest