Remove decimal out of an equation to send to a payment gateway

i have a value that currently has shows a decimal
@$amount = $_POST['amount'];
i need the decimal to show until the variable $amount is sent to the payment gateway
what is the best way to remove the decimal from the variable
so a value of e.g
250.59
will be sent as 25059
thanks

would multiplying by 100 also work?
$amount = "250.59";
echo $amount*100;
// 250.59*100 displays 25059
$amount = str_replace(".","",$amount);
echo $amount*100;
// 25059*100 displays 2505900
Your original question specifically asked how to remove a decimal, not how to multiply a variable by 100.
best,
Shocker

Similar Messages

  • I have bought an IPad in the US however need to return in the UK, am i able to receive a full refund? Note: i have removed the outer packaging.

    I have bought an IPad in the US however need to return in the UK, am i able to receive a full refund? Note: i have removed the outer packaging.

    I have no idea if you can do anything with it in the UK. All you can do is ask for help. Just be prepared for the possibility that they can do nothing for you because the device was purchased in the US.
    You may have to contact the store from which you purchased the device in the US to see if you can send it back to them in exchange for the Mini. This assumes you are within the 14 day window and they will accept it without all the expected packaging.
    Beyond that I don't think anyone here can tell you with any certainty what you can do under the given circumstances. All you can do is ask. The worst that can happen is everyone says, "No."

  • To Remove decimal digit in number field

    Hi experts
    any one can tell me the function in Crystal Report for removing decimal digits in a number type field. like field value is 34.00 should be 34.
    Regards
    Gorge

    Hi,
    use "round(value,dec places)" formula that is there in  functions in crystal report.
    Rgds,
    Premraj

  • Removing decimal in mapping

    Hi,
    How do I remove decimal from float (source) to unsigned integer (target) in graphical mapping?
    For eg:
    Source = 1500.23
    Target = 150023
    Reg,
    Shobhit

    If you want a quick way of just letting numbers to pass, use:
    return a.replaceAll([^0-9], "");
    in a UDF.
    Regards,
    Henrique.

  • Once a month my email contacts get sent out to everyone without me sending them what can i do to stop that?

    once a month my email contacts get sent out to everyone without me sending them,what can i do to stop that?

    Check you haven't been infected by a Botnet:
    Simply put, a bot – which is short for robot – is an automated computer program that allows outside sources to control computers remotely without the users' knowledge. A botnet is a network of hundreds or thousands of computers infected with botnet malware that communicates covertly with a command-and-control (CnC) server run by a type of cybercriminal called a botmaster. Unbeknownst to the individual users, their computers are linked in a rogue network which the botmaster can utilize for a variety of nefarious purposes.
    Detailed information here:
    http://mac-internet-security-software-review.toptenreviews.com/how-do-i-know-if- my-computer-is-a-botnet-zombie-.html
    Contact your ISP.

  • Remove c:out tag

    Hello
    I am using tomcat 5.0
    In my jsp file, I have to type like this
    Name: <c:out value="${myVariable}"/>I know that I can have something like
    Name: ${myVariable}In the top of jsp, I have
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>How I can remove <c:out ...... />
    Thanks

    Well you open the file in your favorite editor, find the line with the <c:out> you don't want, highlight the first part of it (up to the ${, and hit the key labelled "delete", then highlight the tail part of it,  (from } to the end) and press delete again.
    Or you could use a tool to do a global search and replace.
    But seriously - why do it? What does it hurt? What could it break?
    The <c:out> tag escapes html characters for you, so you ARE changing the functionality of the application by doing this.
    Actually taking a closer look, you are using JSTL1.0 (from the URI)
    If you have a JSP2.0 compatible container (eg Tomcat 5 + ) you should just upgrade to JSTL1.1
    - replace standard.jar and jstl.jar
    - change your import line to <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> (note the subtle addition of /jsp)
    - upgrade the declaration in web.xml to register that it is 2.4, rather than 2.3 (using the new xml schema syntax)
    Cheers,
    evnafets

  • Remove decimal points

    Hi,
    how to remove decimal points from all the columns in table in obiee
    thanks

    hi
    add one decimal point
    is this the same? or any?
    Cheers

  • To remove decimal places and round

    hi all ,
    select       (sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                (((((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)*94)/2000)   )
                 when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
             (   ((nvl(H.CLASS_V_CEMENT,0)*94)/2000)   ) 
            when F.ITEM_UOM =  'Pound' then
          CEIL(  ROUND((((((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100)))/2000
           end)*(j.opn_value/2))  SUM_MAT_ACT_TON ,--------transport
                       sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
          when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
                nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound' then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end) SUM_sload ,    ----sload
       sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
         -- when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
              --  nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound'  and F.BLEND <> 'PH'then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end) BLENDING
      ,e.opn_job_desc
         FROM xxnp_opn_joblog_001 E,
              XXNP_OPN_JOBLOG_EST_002   F,
              XXNP_OPN_JOBLOG_STAGE_002 G,
              XXNP_OPN_JOBLOG_SLURRY_003 H,
        XXNP_OPN_JOBLOG_RES_005 J,
         MTL_SYSTEM_ITEMS_B P
          WHERE E.OPN_JOB_DESC   = 'K/D/SP158/SA399/1338/D/0510/1' AND
            E.MANUAL='N'
       and J.opn_resource_desc='4X4  PICK-UP OR LIGHT VEHICLES'
        AND E.OPN_JOBLOG_001_ID = J.OPN_JOBLOG_001_ID
         and F.INVENTORY_ITEM_ID=P.INVENTORY_ITEM_ID
           AND p.ORGANIZATION_ID='103'
          AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
                                    GROUP BY E.OPN_JOB_DESC,j.opn_value
    o/p  i am getting
    SUM_MAT_ACT_TON      SUM_SLOAD                         BLENDING                                   OPN_JOB_DESC
    11587.7954154787         1957.62401925833               1454.62401925833                       K/D/SP158/SA399/1338/D/0510/1
    well can anyone guide me on  obtaining the following output (to remove decimal places and round )
    SUM_MAT_ACT_TON      SUM_SLOAD                         BLENDING                                   OPN_JOB_DESC
    11588                           1958                                      1455                                          K/D/SP158/SA399/1338/D/0510/1thanking in advance
    Edited by: makdutakdu on May 25, 2010 12:48 PM

    select      round( (sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                (((((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)*94)/2000)   )
                 when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
             (   ((nvl(H.CLASS_V_CEMENT,0)*94)/2000)   ) 
            when F.ITEM_UOM =  'Pound' then
          CEIL(  ROUND((((((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100)))/2000
           end)*(j.opn_value/2)))  SUM_MAT_ACT_TON ,--------transport
                       round(sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
          when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
                nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound' then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end)) SUM_sload ,    ----sload
       round(sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
         -- when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
              --  nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound'  and F.BLEND  'PH'then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end)) BLENDING,
       e.opn_job_desc
         FROM xxnp_opn_joblog_001 E,
              XXNP_OPN_JOBLOG_EST_002   F,
              XXNP_OPN_JOBLOG_STAGE_002 G,
              XXNP_OPN_JOBLOG_SLURRY_003 H,
        XXNP_OPN_JOBLOG_RES_005 J,
         MTL_SYSTEM_ITEMS_B P
          WHERE E.OPN_JOB_DESC   = E.OPN_JOB_DESC  AND
            E.MANUAL='N'
       and J.opn_resource_desc='4X4  PICK-UP OR LIGHT VEHICLES'
        AND E.OPN_JOBLOG_001_ID = J.OPN_JOBLOG_001_ID
         and F.INVENTORY_ITEM_ID=P.INVENTORY_ITEM_ID
           AND p.ORGANIZATION_ID='103'
          AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
                                    GROUP BY E.OPN_JOB_DESC,j.opn_value

  • Out of office message when sending mail to Lotus Notes from SAP

    Hi,
    Is it possible to have an 'out of office' message when sending mail to Lotus Notes from SAP?
    I'm sending account statements by mail via a modified version of function FI_OPT_ARCHIVE_CORRESPONDENCE. The SAP username is send as a parameter, and later converted to the e-mail saved in the user profile. This works, - but I would like to have an out of office reply if the user I send to is out of office.
    Hope someone can help...
    Regards,
    Lene

    As Thomas pointed out, you can use regular SMTP mail to send the contents to Lotus Notes. You can use the function module SO_OBJECT_SEND or any of the SAP Office function modules to do this.
    Only thing to remember is that the SMTP may have been disabled by your basis team due to security risks involved. An alternative could be a lotus notes connector available from IBM.
    Srinivas

  • Apple mail out of office rule is sending auto replies to all emails not just newly received emails--HELP!

    Apple mail out of office rule is sending auto replies to all emails not just newly received emails--HELP!  I set up the rule according to another apple support thread and instead of only sending the reply to new mail received, it was sent to all messages I believe that were in my INBOX, thankfully I only had a few but several people that hadn't sent me emails since I set up the rule, received the OUT OF OFFICE reply.  Please help.  Here is the procedure I followed for the out of office rule-
    http://www.ecu.edu/cs-itcs/mac/Apple-Mail-Out-of-Office-Replies.cfm
    I just used my email account which is a business account- not an ECU account but these rules according to the apple thread apply for all emails. Thank you

    You can set it easily...
    To access this feature in Apple's Mail app, right click on any sub-folder (like your exchange inbox on the left) and choose "Get Account Info." A window will pop up that looks like the one below. Make sure to select your Exchange account from the Account dropdown. Then click on the Out Of Office tab. If you have ever put in an Out of Office message in the past it will be displayed here. You can adjust and set your Out of Office from Apple Mail from within this tab.
    Screenshots at:
    http://blogs.appriver.com/blog/behind-the-scenes/setting-out-of-office-from-appl e-mail-app

  • I need my application to be able to open a .pdf file which was previously synced to the iBooks PFDs Collection. I then wish to remove the file from the collection and send it to email.

    I need my application to be able to open a .pdf file which was previously synced to the iBooks PFDs Collection. I then wish to remove the file from the collection and send it to email.

    I opened one of the PDF files in notepad and these are the first couple lines:
    瀖ᕁމጿ␠씴豈䧉筩롈ꓳ劏ꎯ僪뚢頟뻏즏谀㿃夑퀉꟠鲲쮂⫉笿褡밤籞冁탁ӓ轸뿐笼ⵆ횰䄌ඁ淥ة寨闤⬅鳦팥링빨嬄敎უ婏㣴ً鮓ࣿꢚ㑀녲莒඼ိȆ䕇纍쉉籶뺝갞伐쮠᥏﯒넉釖ȓ겴☧ ἣ秵駻�䣞띰㖔流羀籔朼敨ꢉ糶당⬤俉膇䄐惡�ಹꛖ鍡恡ⱶᶜ�堷﹑ﱌ僿걄뎔æ䋷귪⛢⫐䅪䉙὿烶ꖆ႟ᗔ瘞狻틫儩六잶覱낵듘盋崾�ᦜ㺆௹뻹燴ឋ騙쬄ꏿ뽒煹�钼뇲腎稦ꃲ㈃沒ꔈ뺐뛽첑䘶畱䍣紻 ⁜哠鳾

  • Please can you tell me where I send a cheque payment to?

    Where do I send a cheque payment to please?

    From this page :
    Please make your cheque payable to EE, and write your EE account number and mobile phone number on the back.
    Fill out the payment slip on the last page of your bill, and send it with your cheque to:
    EE Limited
    PO Box 238
    SHEFFIELD
    S98 1PS
    Please do not send cash through the post, and allow at least five working days for your payment to reach us.
    Please note: that the Separate Payment Handling Charge applies to ALL payments methods excluding Direct Debit.
     

  • My server is sending SPAM - how do I find out which user(s) are sending it?

    I just received a notice from my ISP that some SPAM was sent by my email server. He included samples of the spam. Unfortunately I can't find any info in the spam to tie it to an IP number that would help me find if one of my users is infected.
    I think I have the SMTP set so that it can only be used with authentication. We have had this set up for some time now (over two years at least) and this is our first instance.
    I'm concerned that one of my users on a PC is infected and using their smtp authentication to send this stuff.
    Any advice on where to go from here?
    I have included the results of postconf -n to see if I have any configuration problems.
    Thanks.
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    inet_interfaces = all
    mail_owner = postfix
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    mapsrbldomains =
    messagesizelimit = 15728640
    mydestination = $myhostname,localhost.$mydomain,localhost,zeryn.com
    mydomain = zeryn.com
    mydomain_fallback = localhost
    myhostname = mail.zeryn.com
    mynetworks = 127.0.0.1/32,65.39.65.22
    mynetworks_style = host
    newaliases_path = /usr/bin/newaliases
    ownerrequestspecial = no
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpdclientrestrictions = permit_mynetworks rejectrblclient sbl-xbl.spamhaus.org permit
    smtpdpw_server_securityoptions = login,cram-md5,plain
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpduse_pwserver = yes
    unknownlocal_recipient_rejectcode = 550
    virtualaliasmaps = hash:/etc/postfix/virtual
    virtualmailboxdomains = hash:/etc/postfix/virtual_domains
    virtual_transport = lmtp:unix:/var/imap/socket/lmtp
    xserve Mac OS X (10.4.9)

    A list of the emails was sent to me, but I'm not sure there is enough header info in them to tell me what I want. However, I searched the log for the "from email" and found some at about the same time in the log. Here is the header and the parts of the log dealing with this email address:
    Email header? -------------
    From: "alisander gianni" <[email protected]>
    To: <Undisclosed Recipients>
    Subject: RE: Get the size that kills with enlargement pills. Try Advanced Gain Pro ***** Enlargement Pills.
    Date: Sun, 6 May 2007 07:43:43 -0700
    Message-ID: <357701c78fec$f1ee7960$0801010a@lye>
    MIME-Version: 1.0
    Content-Type: text/plain;
    charset="koi8-r"
    Content-Transfer-Encoding: 7bit
    X-Mailer: Microsoft Outlook Express 6.00.2900.2527
    Thread-Index: AceP7S2xF77i9UyvRp6aehJVe3GLbg==
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
    X-Sieve: CMU Sieve 2.2
    X-AOL-IP: 65.39.65.21 (<-- this is my server ip)
    SMTP log entries ------------
    May 6 07:44:49 zeryn postfix/smtpd[2846]: warning: 60.48.247.22: hostname tm.net.my verification failed: Host not found
    May 6 07:44:49 zeryn postfix/smtpd[2846]: connect from unknown[60.48.247.22]
    May 6 07:44:50 zeryn postfix/smtpd[2846]: 0621623D6EDE: client=unknown[60.48.247.22]
    May 6 07:44:50 zeryn postfix/cleanup[2850]: 0621623D6EDE: message-id=<357701c78fec$f1ee7960$0801010a@lye>
    May 6 07:44:50 zeryn postfix/qmgr[118]: 0621623D6EDE: from=<[email protected]>, size=1847, nrcpt=1 (queue active)
    May 6 07:44:50 zeryn postfix/smtpd[2853]: connect from localhost[127.0.0.1]
    May 6 07:44:50 zeryn postfix/smtpd[2853]: EC70A23D6EE1: client=localhost[127.0.0.1]
    May 6 07:44:50 zeryn postfix/cleanup[2850]: EC70A23D6EE1: message-id=<357701c78fec$f1ee7960$0801010a@lye>
    May 6 07:44:50 zeryn postfix/qmgr[118]: EC70A23D6EE1: from=<[email protected]>, size=2231, nrcpt=1 (queue active)
    May 6 07:44:50 zeryn postfix/smtpd[2853]: disconnect from localhost[127.0.0.1]
    May 6 07:44:51 zeryn postfix/smtp[2851]: 0621623D6EDE: to=<[email protected]>, relay=127.0.0.1[127.0.0.1], delay=2, status=sent (250 2.6.0 Ok, id=02590-09, from MTA: 250 Ok: queued as EC70A23D6EE1)
    May 6 07:44:51 zeryn postfix/qmgr[118]: 0621623D6EDE: removed
    May 6 07:44:51 zeryn postfix/pickup[2343]: 2501123D6EE5: uid=77 from=<[email protected]>
    May 6 07:44:51 zeryn postfix/lmtp[2854]: EC70A23D6EE1: to=<[email protected]>, relay=/var/imap/socket/lmtp[/var/imap/socket/lmtp], delay=1, status=sent (250 2.1.5 Ok)
    May 6 07:44:51 zeryn postfix/qmgr[118]: EC70A23D6EE1: removed
    May 6 07:44:51 zeryn postfix/cleanup[2850]: 2501123D6EE5: message-id=<357701c78fec$f1ee7960$0801010a@lye>
    May 6 07:44:51 zeryn postfix/qmgr[118]: 2501123D6EE5: from=<[email protected]>, size=2510, nrcpt=1 (queue active)
    May 6 07:44:51 zeryn postfix/smtpd[2846]: disconnect from unknown[60.48.247.22]
    May 6 07:44:51 zeryn postfix/smtpd[2853]: connect from localhost[127.0.0.1]
    May 6 07:44:51 zeryn postfix/smtpd[2853]: 3949F23D6EE8: client=localhost[127.0.0.1]
    May 6 07:44:51 zeryn postfix/cleanup[2850]: 3949F23D6EE8: message-id=<357701c78fec$f1ee7960$0801010a@lye>
    May 6 07:44:51 zeryn postfix/qmgr[118]: 3949F23D6EE8: from=<[email protected]>, size=2874, nrcpt=1 (queue active)
    May 6 07:44:51 zeryn postfix/smtpd[2853]: disconnect from localhost[127.0.0.1]
    I'm not sure how to read the log file. Is there something here out of the ordinary? Does the server consider these valid users/email?

  • Javascript - Formatting Return Values & Removing Decimal in Dollar Amount

    Hi, I'm looking for some help. I'm new to Javascript and working off my limited knowledge. Below is one item I need help figuring out.
    ---JavaScript Registration Fee---
    I'm using the following document level Javascript in Acrobat to calculate the pro-rated registration fee based on the current month:
    **Note: Text Field "Today" is using the following value:
    var f = this.getField("Today");
    if (f.value=="") f.value = util.printd("mm/dd/yyyy", new Date());
    ---- Below is the Registration Fee Javascript ---
    function calculateRegistrationFee() { 
         var s = this.getField("Today").value;
         if (s!="") {
              var d = util.scand("mm/dd/yyyy", s);
              return (12-(d.getMonth())) * 1.25;
         return "";
    I use the following in the Text Field (Text Field Properties ---> Format ---> Custom Format Script) to display the results:
    event.value = (calculateRegistrationFee()).toString();
    1) How can I format the return value to remove the decimal (period) from the results & split into two text fields?
    For Question #1 - Example 1, Let's look at this example:
    Using the current date (05/22/2013), then
    a. The output of the function above = 10
    This is a dollar amount so the output 10 is really $10.00. I would enter the cost into two fields (RegFee1 & RegFee2) as "10 00". (See below). So how do I format the return value to enter into these fields correctly?
    For Question #1 - Example 2, Let's look at this example:
    Using the current date (06/22/2013), then
    a. The output of the function above = 8.75
    Given the information in the example above, how do I format this return value to enter into these fields correctly?
    Thanks,
    Stephen

    Some time ago I created this (german) how to document
    http://www.oracle.com/global/de/community/tipps/textfield_autoformat/index.html
    about formatting elements using JavaScript. Currency formatting is not contained but perhaps the other stuff in the javascript file
    http://www.oracle.com/global/de/community/tipps/textfield_autoformat/library.html
    is helpful.
    Regards
    -Carsten

  • JSP removing decimal points

    Hello all.
    I am developing a site and Im new to JSP. now one of the pages I am developing needs to pull data out of a MySQL table.
    I can pull the data and it is working great! BUT the particular data I am pulling is pricing information.
    The data is in the following form:
    1.4800
    thats a price so its one dollar and fourty eight cents.
    the extra two decimal points are needed by the backend software so I cant remove them from the MySQL table (plus there is like 66,000 entries in the table).
    I need to find a way to remove these with JSP some how as they are irrelevant to what we need to display. the numbers are already rounded off so that all entries end with two 0's is there an easy way to remove these two zero's?
    Just so you know my code goes something like this.
    <form>     
    <% out.println("<select name=\"select\">");
    out.println("<option selected>Please select a Country</option>");
    int iBusNo = 0;
    int i = 0;
    while(bMoreData)
    out.println("<option>" +BusDirRecordset.getString("LongName")+ " - $" +BusDirRecordset.getString("Rate")+ "</option>");
    bMoreData = BusDirRecordset.next();
    i++;
    out.println("</select>");
    %>
    </form>If you have any suggestions I'd greatly appreciate the help!

    Go to http://java.sun.com/j2se/1.4.1/docs/api
    Look up the documentation for the class "NumberFormat".
    Cut and paste (with a slight mod) from the online document:
    NumberFormat nf = NumberFormat.getInstance();
    nf.setMinimumFractionDigits(2); // cut off trailing zeroes
    nf.setMaximumFractionDigits(2); // change "1.5" to "1.50"
    for (int i = 0; i < a.length; ++i) {
        output.println(nf.format(myNumber[ i ]) + "; ");
    A neat side-effect is that it's supposed to know your local "locale" information, so if you're in Spain using commas instead of periods as the fraction separator, that's what it'll do.

Maybe you are looking for

  • I have music that i have on my ipod that i want saved on i tunes how can i do this if none of the music was purchesed

    i had to erase all my stuff on my computer including my itunes so today i decided to down load it again so i could update my ipod i want all my music on itunes so i can clean my ipod then put it all back on. but all i can do is sync it after that i d

  • Content moving in ie (not safari, FF)

    I am designing a site and when previewing in FF & safari the text areas are similar in look & ok but when I preview in ie the page text flows off the page & the layout looks much larger. ex:link www.carbon9.com/home.html

  • Reg HR Analytics

    Hi Guru's, Could someone explain me in detail about what is HR Analytics and also the necessary objects related to it in BW. Is HR Analytics something different compared to the normal HR what we have in BW or is it same. Requesting you to please expl

  • When watching news movies, I go to full screen, and screen goes blank.

    The small video image which shows the news has a button to make the image full screen. When I press that, the whole screen goes blank. When I use Internet Explorer, it works OK. I think It was also OK when I used the previous version of Firebird.

  • Problems with Put & Categories

    Geez, I just typed this whole story & it didn't take.  Again,  I just got a new Windows 7 computer & reinstalled Dreamweaver CS3.  The last time I installed it was in 2008 on Windows XP & forgot how things work.  I did save some screenshots from last