473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 7238
Just replacew those ###,### with "000,000".
This is produce the same effect.
Oct 7 '08 #2
Dormilich
8,658 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

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

Similar topics

1
by: Ryoga | last post by:
How can I print out the value of a large double in plain decimal form without the exponential notation? For example (quick code): PlainPrint.java: --------------- public class PlainPrint {...
4
by: Timothy Fitz | last post by:
Why are all numberical literals in exponential notation floats? To me it is counter-intuitive for 1e3 to behave so fundamentally different from 1000. Timothy Fitz
0
by: Razvan | last post by:
Hi, In an article by Mr. Kohsuke Kawaguchi found at: http://www.xml.com/pub/a/2001/06/06/schemasimple.html?page=2 he explains why notations should be avoided. The following XML Schema
5
by: Neal Becker | last post by:
Like a puzzle? I need to interface python output to some strange old program. It wants to see numbers formatted as: e.g.: 0.23456789E01 That is, the leading digit is always 0, instead of the...
5
by: Dennis Myrén | last post by:
Hi. Is there a way to make sure that float, double and decimal data types never will be presented in a scientific notation? I have tried to round(Math.Round) float's to 7 decimals, double's to...
2
by: Rod Brick | last post by:
I'm trying to print a Double in straight decimal form, not exponential. I can't seem to accomplish this. This seems like it should be simple enough. The output I'm looking for is "0.00001", not...
0
by: Greg | last post by:
I am working on an application that requires working with numbers in scientific notation. I am using SqlServer as the database and I have created strongly typed data adapters and datasets. The...
2
by: Greg | last post by:
I am working on an application that requires working with numbers in scientific notation. I am using SqlServer as the database and I have created strongly typed data adapters and datasets. The...
4
by: b4ukiran | last post by:
Hi all, I have a requirement to print large double values without the exponential notaion. The double value can be a declared variable or any calculated value within the code. In any case, I...
8
by: pereges | last post by:
Hi, can anyone please tell me what is wrong in this program and why does it keep givng nan as the output(eg. take input as 1.2e+10) ? #include <stdio.h> #define PLANCK 6.626068e10-34 int...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.