forse potrebbe bastare

Number(variabile);

prova un pò