The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> How to convert long number to K M B
The_webmaster
post Sep 26 2021, 09:06 AM
Post #1


Member
***

Group: Members
Posts: 40
Joined: 5-February 21
Member No.: 27,773



Hi, please I want to convert long number to K,M or B. Example 1200 - 1.2k, 120000 - 1.2M. Can anyone help ? Thanks in advance
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
The_webmaster
post Sep 27 2021, 10:08 AM
Post #2


Member
***

Group: Members
Posts: 40
Joined: 5-February 21
Member No.: 27,773



Thanks Pandy, I divided as you wrote and set the visible numbers with toFixed() and that worked great. Thanks very much!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 27 2021, 11:27 AM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,732
Joined: 9-August 06
Member No.: 6



Yes, I realized later I missed that bit. Sorry.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 03:51 AM