469,360 Members | 1,749 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

Exponential Notation fails in format-number()

ashsa
45
Hi everyone,
I am trying to display a numeric value fetched from an sql server table which is stored in the exponential notation. For eg, 0.08 is getting stored in the table as 8.0000000000000002E-2. This causes the xslt function format-number() to fail.
I use it as
Expand|Select|Wrap|Line Numbers
  1. <xsl:value-of select='format-number(8.0000000000000002E-2, "###,###.00")' />
The message says that
Expand|Select|Wrap|Line Numbers
  1. This name may not contain the '#' character: -->#<--##,###.00 -->format-number(8.0000000000000002E-2, "###,###.00")<--
I searched for an xsl function so that I would use it like
Expand|Select|Wrap|Line Numbers
  1. <xsl:value-of select='format-number(number(8.0000000000000002E-2), "###,###.00")' />
To my disappointment no numeric function handles the exponential notation. Any help will be greatly appreciated.

Many thanks in advance..
Aug 20 '08 #1
3 6856
Just replacew those ###,### with "000,000".
This is produce the same effect.
Oct 7 '08 #2
Dormilich
8,652 Expert Mod 8TB
if I read the specs right, then exponential notation is not supported in XSL at all.

regards
Oct 7 '08 #3
jkmyoung
2,057 Expert 2GB
Sanitize your output from the SQL side. Can we see the query that you're using?
If you use a number mask, it would help. Eg see:
http://www.baycongroup.com/learning_sql.htm
Oct 8 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Timothy Fitz | last post: by
5 posts views Thread by Neal Becker | last post: by
2 posts views Thread by Greg | last post: by
8 posts views Thread by pereges | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.