By linuxpimp on
Hello
I have some fields that result in a computed field result.
Currently, the result looks like "308219.17808219"
Where do i change the settings so results will look like "308, 219.17 "?
Thanks
L
Hello
I have some fields that result in a computed field result.
Currently, the result looks like "308219.17808219"
Where do i change the settings so results will look like "308, 219.17 "?
Thanks
L
Comments
number_format
If you really want to move the decimal, you would have to divide or multiply by 10, 100, 1000 etc. But I think you mean you want to group the thousands, right? You can use the number_format function for that: http://www.php.net/manual/en/function.number-format.php. In your case, you could use
Thank you Marc Please excuse
Thank you Marc
Please excuse my next question:
Where would be the correct place/file to add the PHP code you kindly provided?
Thanks
L
I'm not a computed field
I'm not a computed field expert, but looking at http://drupal.org/node/149225 I would say:
Calculate the value in the 'Computed Code' field (you probably already did that) and place this in the Display Format field:
Let me know if it works.
Thank you! I had to remove
Thank you!
I had to remove the
andtags and it did exactly what i required.Much appreciated
L