On Wed, 2011-09-07 at 17:34 +0100, John Mullen wrote:
This gets weirder.
Try this: Create a table CONTRACTS with an INTEGER field (ID) as a
Primary key, set to auto fill
and a decimal field (Rental) set to 2 decimal places.
Add the value 150.00 to the first row.
Run the query
SELECT "CONTRACTS"."Rental" FROM "CONTRACTS"
this returns 150.00
Good so far.
Now run the query
SELECT 1.00, "CONTRACTS.Rental" FROM "CONTRACTS"
this returns 1.00 150
Any idea why?
You are selecting the value 1 and the all the values in the Rental
column. Why it is not displaying the decimal places I do not know.
To select the ID field you need to
SELECT "ID", "Rentals" or *
FROM "Contracts"
regards
John
On 6 September 2011 20:48, Andreas Säger <villeroy@t-online.de> wrote:
Steve Edmonds wrote:
Hi.
From the original posters example, he has decimal places, just not
trailing zeros. I think the calculation is correct just the display of
the result needs formatting. I don't use Base (yet) but is the correct
data type for currency DECIMAL. Can the field display format be set by
right clicking the field in the form as in a form letter.
steve
The DATEDIF function returns an integer, 7 is an integer. So there is no
decimal involved in the calculation and the result is an integer despite
the
division. No formatting attribute will change an iteger number. Any
currency
format will end with .00 if the formatted value is an integer one.
How about this one with the last brace shifted:
ABS( DATEDIFF( 'dd', "RENT_PAYMENTS"."Date_Paid", CURDATE( ) ) ) / 7.00
(first get the absolute day difference, then divide by decimal 7.00)
--
View this message in context:
http://nabble.documentfoundation.org/Calculated-fields-not-showing-decimal-places-in-BASE-query-tp3313752p3314620.html
Sent from the Users mailing list archive at Nabble.com.
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems?
http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted
--
Cheapest mobile tariffs - GUARANTEED <http://www.discoverhow.co.uk/>
"I train people to make money" <http://www.makemoney.discoverhow.co.uk/>
"Action always beats inaction" - Robert T. Kiyosaki
--
Jay Lozier
jslozier@gmail.com
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.