<div dir="ltr">Ahh.. Then that's a Masking,/Padding you want then, and not a Rounding Math function.<div><br></div><div style>Rounding 12.000 to 12 is correct no matter how many decimal places you ask for.</div><div style>
12.10000 will probably go to 12.1 as well</div><div style><br></div><div style>I know with a couple steps of logic you could probably use INSTR() and RPAD to test for whole number/tenths then Rpad in extra zeroes when conditions hit.</div>
<div style>I can't think of any other ideas off the top of my head..</div><div style><br></div><div style>Unless MapGuide parses DataFormat expressions,  something like using {0:"c"} for Currency, or {0:"n"} for 2 digit Number. {0:"MM/dd/yyyy"} etc.</div>
<div style>I've not seen anything like that yet in my travels.</div><div style><br></div><div style>-Ryan<br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 9:51 AM, Gunter Becker <span dir="ltr"><<a href="mailto:gunter.becker@csogis.de" target="_blank">gunter.becker@csogis.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ryan,<br>
<br>
thanks for your reply.<br>
<br>
I think you misunderstood my problem. I don't want to strip of the decimal<br>
places. Instead I do want to have 2 digital places. My problem is that I<br>
have already a float (ex 30.00000) and the expression engine automatically<br>
strips of the decimal places. But I would like to have this format: "30.00"<br>
<br>
So, I suppose it is a shortcoming of the expression engine.<br>
Round(property,2) should do the job!<br>
But if you make a static expression like Round(12.000,2) you will get "12"<br>
as the result.<br>
<br>
Maybe there is a workaround?<br>
<br>
Gunter<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/Expression-format-float-to-decimal-with-2-decimal-places-tp5039545p5039596.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/Expression-format-float-to-decimal-with-2-decimal-places-tp5039545p5039596.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</div></div></blockquote></div><br></div>