Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Decimal Places
Last Post 03-21-2012 12:23 PM by Cube Dweller. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Cube DwellerUser is Offline
wading in the water
wading in the water
Posts:17
Avatar

--
03-20-2012 05:20 AM
    Hi all,

    Is there a way to round or cut off the numbers at 2 decimal places?

    $5.25 instead of $5.2543
    -0.78 instead of -0.7801

    I'm placing this in a tight area and need to save space, and want predictable widths.

    Thanks, CD
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    03-20-2012 06:14 AM
    Hello,

    Are you pulling in these values from a data base or are you calculating with JavaScript on the fly on the page?

    If it's coming from the data base and you have the ability to format using SQL I would consider using this trick:

    Cast(Cast(Round(cast(ColumnName AS float(10)),2) as Decimal(5,2)) as nvarchar(50)) As AliasName

    This is the best technique I've come across in TSQL, I'm sure there are many predefined functions out on Google that you can use.

    Or if you don't have access to format the value, then you can modify the column type in the data base to accept two decimals.

    Let me know your thoughts or questions.

    Thanks,

    Ryan
    Cube DwellerUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    03-20-2012 11:25 AM
    Hi Ryan,

    This is for the Stock Quotes module; I’d like to format some of the numeric tokens in the temple. Such as… $(LastTradePrice) and $(PriceChange)

    I want to force them to 2 decimals for a consistent look. Sometimes the source (Yahoo?) sends 3 or 4 places making the display look jumbled/messy.

    Thanks CD
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    03-21-2012 09:47 AM
    Hi CD, what a great forum profile pic

    Unfortunately this is not a feature that the module offers right now... I have added this to the list to review for future enhancements however the module would require modifying the source code to make these changes so you might consider going this route if you own the license with source code and/or having us handle the requirements via Premium Support and Implementations assistance... You can find more details and/or pick up hours at http://www.datasprings.com/PremiumSupport.

    Thanks!

    -Chad
    Cube DwellerUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    03-21-2012 12:23 PM
    Whatever the 'decimal places'; this is a great little module and really adds value to our site. (i.e. It makes me look good)

    Thanks for the consistently great support!
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
     
     
       
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi