Subject: | |
From: | |
Reply To: | |
Date: | Fri, 24 Oct 2014 22:37:28 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Eric
If you're only needing this for export then you could possibly use the export option 'Apply current layout's data formatting to exported data'
However if you want the number stored with exactly 2 decimal places, you could use the following as the auto-enter calculation for the field with 'Do not replace existing value (if any)' unchecked:
If ( Self < 0 ; "-" ) & Div ( Abs ( Self ) ; 1 ) & "." & Right ( "00" & Round ( 100 * Mod ( Abs ( Self ) ; 1 ) ; 0 ) ; 2 )
or, if you prefer;
Let ([
sign = If ( Self < 0 ; "-" ) ;
i = Div ( Abs ( Self ) ; 1 ) ;
d2 = Round ( 100 * Mod ( Abs ( Self ) ; 1 ) ; 0 )
] ;
sign & i & "." & Right ( "00" & d2 ; 2 )
)
cheers
Tom Elliott
On 24 Oct 2014, at 21:01, Eric Van Deputte wrote:
> On 24/10/2014 21:58, Richard S. Russell wrote:
>>
>>> On 2014 Oct 24, at 14:47, Eric Van Deputte <[log in to unmask]> wrote:
>>>
>>> Hi everyone,
>>>
>>> I'm in the urgent need of a formula that gives me always a numberfieldresult with no more and no less than 2 decimals ( "xxxxx.00" ) ....
>>> The data from which the result has to be to calculate can be something like:
>>> 0.01
>>> 0.10
>>> 0.1
>>> .01
>>> 16.01
>>> 11
>>> 111.00
>>>
>>> an are first rounded to 2 decimals
>>
>>
>> Do you need them to be STORED that way or only DISPLAYED that way? Because displaying is easy. You can do it under the “Data Formatting” section of the “Data” tab under the inspector:
>>
>>
> To be stored to be exported ...
>
> --
>
> mvg
> --------
>
> Dr. Eric Van Deputte dvm
> 1750 Lennik
>
> [log in to unmask]
> www.vwin.be
>
> phone +32(0)2 523 32 95
> gsm: +32(0)475 34 80 36
> fax +32(0)70429537
>
>
>
>
> Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus actief is.
>
>
|
|
|