Format functions.....
Hi,
I have detected something strange.....
There are 2 different kind methods how i can write a format function:
1. <?format-number:1234;'SOMESTRING'?>
2. <?format-number(1234,'SOMESTRING')?>
If i use the first kind the output format is sometimes wrong.
example: <?format-number:1123.45565643;'0.00'?> should be: 1.123,45 in german and 1,123.45 in english local. But sometimes the result is: 1123,45565643 and nothing changed. (I think its some kind of error if I am combinating the sum() function)
And if i use the second kind the output format is sometimes wrong. everything works fine. But the reportlocal of my client Page has no influence to the output and doesnt effect the seperators...
I hope that helps to fix a bug.
Or is it no bug?
Greetings....
no solution here?
Similar Messages
-
How do I fix the problems with text formating functions in hotmail and other text based sites?
In a Mailing list provider site it disables the text formating functions, instead only showing a 'loading' message. The functions never appear. In Hotmail the scroll arrows on the right hand side does not work. Sometimes the email toolbar becomes 'grey' and the buttons do not work. When forwarding an email sometimes the email does not show in the new email message.
== This happened ==
Every time Firefox opened
== Firefox was reinstalled March 2010.The only possible fix was turning the phone off immediately and burying it in a bag of dry rice for a week at least. That might...just might...have worked. But you're way beyond that and I see no fixes. In fact the phone is probably going to get more problems before finally gving up the ghost. Continued use is just shorting out more and more of the circuitry. For that reason I don't think repair is much of an option. Go to an Apple Store and buy an out-of-warranty replacement.
-
Can I use FORMAT function in SQL statement?
If not, how to do it?
Here is the SQL that I want to do.
SELECT last_name, first_name, FORMAT(birth_date, 'mm/dd/yyyy') FROM customerHi,
To display the result as mm/dd/yyyy, you can use the code like below:
DECLARE @d DATETIME = '10/01/2011';
select FORMAT(@d,'d','en-US' )
To display the result as yyyymmdd, use CONVERT:
DECLARE @d DATETIME = '10/01/2011'
SELECT convert(varchar, @d, 112)
Reference:
http://www.sqlusa.com/bestpractices2005/centurydateformat/
Thanks.
Tracy Cai
TechNet Community Support -
Pad leading zeros in a string.Format function
How could use the string.Format function and in the format text pad a leading zero?
Pseudo code is:
string parm = “5”;
string format = “Some number formatted as 3 dig: Format({0}, 000)”;
string output = string.Format(format, parm);
Where the output would look like this:
“Some number formatted as 3 dig: 005”
Thanks.Thanks everyone. Unfortuantly there's a constraint where the padding operation needs to be embedded in the format string. This entire operatin is being put together dynamically where the format strings are being pulled from a library of format strings stored
in a database. at runtime we don't know how which format will be used and how many parameters will be passed in. we have logic to handle the unknown number of paramters as there is metadata which helps us with that.
the need for leading zeros needs to be part of the overall format defined in the format string. for example, a real format string stored in the database looks like this:
"LINE_NO = '{0}', AND GEO_LOCATION = 'T{1}, {2}, R{3}, {4}, , Sec. {5}'"
and its output from the string.Function is:
"LINE_NO = 'TG-G2469', AND GEO_LOCATION = 'T155, N, R93, W, , Sec. 5'"
the last parameter (param 5) had a value of 5. In another case the output requirement might need to look like this:
"LINE_NO = 'TG-G2469', AND GEO_LOCATION = 'T155, N, R93, W, , Sec. 05'"
note the "05" at the end...
the logic of using the leading zero needs to be embedded in the overall format string text.
Thank you. -
Format function in Link Inspector
Hi,
May i know that how to fully utilize the Format function in the Link Inspector?I even unable to click on those format...mind to share the tips?!
ThanksFirst that link format does not work for the navbar. It only works on text based links you add to the page. Once you've set up the URL in the Link pane you can go to the format pane and set the link, rollover, visited and disables formats. But you have to have the text link selected first. Thisdemo page may shed some light on it.
OT -
Formatting function for columns which store japanese characters
I have a table which stores names in all languages.I have a SQL Report.When the names are in English the formatting is good.But when the names are in Japanese.The formatting is going wrong.
A part of SQL report is as follows
COLUMN emp_name formata20
COLUMN mgr_name formata20
select emp_name,mgr_name
from employee;
The data in the columns are coming in ZigZag fashions.I tried using ltrim and rtrim but had no impact.Are there any functions which would help in formatting the query.I need this very urgently.
Thanks in advanceChange your environment variable 'nls_lang' appropriately to reflect the language.
For example on my computer, this variable has the value
American_America.WE8ISO8859P1
Typically NLS_LANG environment variable is of type:
language_territory.charset
If you are using Japanese character set, you could specify the environment variable as:
JAPANESE_JAPAN.JA16EUC
Please go through Oracle's Globalization Support Guide for additional information. -
Question abotu String.format() functionality
Hello all,
I am curious as to whether this functionality exists in the String.format method, or if there is any other class in the current version of Java that would allow for this.
I want to construct a format string, where if one of the args contains a newline character in it, the same format for that arg will be used on the newline.
Example:
String s = String.format("%20s%20s","this line contains\na newline character","so does\nthis one");
System.out.println(s);
Actual Output:
this line contains
a newline character so does
this one
Wanted Output:
this line contains so does
a newline character this oneHopefully there is something that exisits in the language that would allow me to do this. If no one can think of any easy way to do this? I have a few ideas, but it would require a whole lot of string manip. than I want to put into it =(
Anyways, I look forward to your reply. Thanks!You want the method to treat the strings as multi-line blocks of text instead of as strings? And put the blocks next to each other instead of the strings? Maybe padding the blocks with spaces? Forget it, that's way too complicated for a quick and dirty formatting method.
And yes, a whole lot of string manipulation would be going into that.
Assuming that I understood your requirements correctly. I just went by the picture, I couldn't make any sense out of the words you used to describe it, so I may well be totally wrong. -
Problem When Formatting Functions
When I right click on a function that I am editing and click on format. My line comments are all stripped away.
Regardless of comment style --- or /* */
Here are some samples:
-- This function is called from within ApEx
/* tada
line two
Both comment sets above are completely removed when I format.
SQL Developer
Version 1.5.1 Build MAIN-5440 Windows XP SP3
DB: 10.2.0.3 EE
Thanks,
JustinHi Justin,
My comments are not removed, there is an option to remove comments, is that set?
Tools->Database->SQL Formatter->Other, Special Formatting 'Delete Comment'
-Turloch -
String formatting functions for ASCII Reports in TestSatnd 4.0
Hi,
I am trying to create ASCII text reports that shall contain a list of instruments and their parameters in a tabular form (as shown below). Is there any function available for string formatting that is readily available to format the strings in a way that they are alinged in a way to give a tabular look. Using "\t" between the details listed gives a very uneven look.
Name Param1 Param2 Param3 Param4 Param5
Instru1 Xxxx XXXXXX X XXXXXX XXX
Instru 2 YYYYYY YYYY YYYYYY YYY YYYYYY
Thanks
Saranya
Message Edited by SaranCh on 04-23-2008 12:32 AMYou could use Str() to put strings within fixed width columns. Examples for left and right justification:
"|" + str("MyValue","%-40s")+"|"
-->
|MyValue |
"|" + str("MyValue","%40s")+"|"
-->
| MyValue| -
Hi
I'm new to constructing functions in Numbers so I don't know if this
can actually be done.
Basically, I'm trying to change the cell colour IF the string LEN is > 10
So for I've got:
=IF(LEN(Ad2 General>10),Ad2 General)
But not to sure exactly how to pull this off.
I've looked around the web, but can't find anything.
ThanksFor this kind of need, I use a tip described here many times.
I build an auxiliary table with the formula :
=IF(LEN(Tableau 1 :: B2)>8,1,0)
where Tableau 1 is the name of the main table.
I apply to this table the conditional format :
if cell contents equal 0 set text and background to white
if cell contents equal 1 set text and background to red
Then, I move the table behind the main one defined as transparent.
The result is :
Yvan KOENIG (VALLAURIS, France) jeudi 16 juin 2011 15:24:50
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
Float point format function --- "Beginner"
Hii every body
1-I want to format any float number to be with only two decimal digits
examble :
95.3213 converted to be 95.32
is there any function that can do this ???
2- I want to remove any spaces from any given string
examble:
mystring = "Hi my friend " coverted to be mystring = "Himyfriend"
thank you ...1 Check out the API for java.text.DecimalFormat
double d = 95.3213;
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(2);
System.out.println(nf.format(d);2 If you have java1.4 you can use the replaceAll method in string:
String myString = "Hi my friend ";
myString = myString.replaceAll("\\s", "");The regular expression "\s" matches all whitespace - spaces, tabs etc etc -
How to find download and convert pdf format function module for a script
Hi,
I have script requirement its already fixed with nace tcode and when we run output type in tcode va02 its generatinga mail with attaching script ouput in pdf format. Now i want find how that script generating pdf format and attaching to mail there in driver program no any function modules using for that.
So anyone can help me for this finding.
Thanks.Dear Pradeep,
Use FM: CONVERT_OTF, this FM converts PDF output. After use the FM: SX_TABLE_LINE_WIDTH_CHANGE FOR convert line width 255.
Regards,
Abbas. -
Format functions - Improvement request
Hello all,
I have request for update.
I.e, i have some site that deals with the products, all products have price, discount, quantity and VAT.
I want to all prices be formated like this: 123,298.23
I have to create functions:
function formatNumber(nStr){
nStr = parseFloat(nStr);
nStr = nStr.toFixed(2);
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
return x1 + x2;
function formatVPC(region, lookupFunc)
var nStr = lookupFunc('{dsStavkeNarudzbenice::price}');
return formatNumber(nStr);
And to do this:
{function::formatVPC}
and if i calculate total like price* quantity i have to add new
function formatPrice*Quantity(region, lookupFunc)
var nStr = lookupFunc('{dsStavkeNarudzbenice::jedinicna_cena}');
return formatNumber(nStr);
Why Not {price| formatNumber}?
Something like Smarty formating, with possibility to add params, like {price|formatNumber, ',', "."} - where i want to use , for 1000 separator and . for decimal separator?
Then I can use just one function for all project, without creating additional separators.
Creating small math expressions ?
Now, I can not do this:
Total Sum is {price}*{quantity}
Why not:
Total Sum is {eval|'{price}'*'{quantity}'} or some other solution?
Rationale:
It decrease code, it does not inflicts with application logic, it is more usable and readableCmon people, support please, i think that this is good idea...
-
Invalid column name in query string - using Format function
In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
& "HOME_REGION FROM CCC2.CASE_EPRP " _
& "WHERE (HOME_REGION = 'NCR') AND " _
"(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
& "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
In the Access Query tool I can include this field
Format(CALL_DATE,'mmm-yy')
and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
Format(CALL_DATE,'mmm-yy')
in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
Thanks again,
RichThank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
"date format not recognized"
when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
Thanks again for your help.
Rich -
Date format function in xquery - osb
Hi
I want to assign current datetime to </DateTime> node in the following format in an xquery mapping file
<DateTime>2013-09-10T06:49:12Z</DateTime>
I have tried to do it as follows but it gives error
<DateTime>{fn:format-dateTime(fn:current-dateTime(),"[Y01]-[M01]-[D01] T[H01]:[m01]:[s01]:[f01]Z")}</DateTime>
<Destination>ERP</Destination>
<Sender>CRM</Sender>
Thanks in advance... can someone help me on thisYou can try this. This will give you the desired format.
fn:concat(fn-bea:date-to-string-with-format("yyyy-MM-dd",fn:current-date()),"T",fn-bea:time-to-string-with-format("HH:mm:ss", fn:current-time()),"Z")
Thanks
Jahangir
Maybe you are looking for
-
Hello, I just used VNC for the first time on my Mac and i have to say, it's great! However, I have one issue which is I can't lock the screen during my VNC session. So if I am on my iPhone and I VNC into my Mac, everything I do can be seen on my Mac.
-
Acrobat 9 pro, crashes with Printer Marks
In Acrobat 9 pro, open the PDF file, add the Printer Marks for "Trim" and "Registration", save the file and close the acrobat. Wait for few minutes and the acrobat crash occurs. Attached the screen shot. Please let know the solution for this issue.
-
TS1646 i want to select none in payment info but its not showing anymore
hello i want to change my payment method from visa to none but the option none is not showing how can i change it, thank you
-
Applescript Safari Save Document error
The following applescript command started giving me an error message 3 days ago. I suspect there was a bug in Apple's last OS software update. tell application "Safari" to save document 1 in file ((path to desktop as string) & "test") The error I g
-
Isight does not work at all. Need help!!!!
I restarted my mac, and the isight still not working, what are my options?