cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert a string value into numeric

Former Member
0 Kudos

Hi dear all,

( sap personas scripit 😞

I have this variable credit_e="4,250,000.00" text ,string

n_credit_e = parseInt(credit_e); // is almost working but this function is returning only the integer 4

should be 4,250,000.00 ( as numeric )

Thanks,


Abilio

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos
var credit_e="4,250,000.40";

var n_credit_e=Number(credit_e.replace(/\,/g,''));
Former Member
0 Kudos

Hi Tamas,

Thanks a lot for your input on that. Is working fine.

Have a nice day!

Abilio

VenkyM
Participant
0 Kudos

Hi,

how to convert "4,250,000.40" to 4,250,000.40 that is convert string to number by remaining the commas and dots ?

Answers (0)