tags:

views:

67

answers:

2

Via jquery / Javascript

Given a number 1234567891234

How can I concat, or truncast By removing the 2 from the left to make that number a valid integer I can insert into MySQL:'

4567891234

Thanks


This question edited by someone other than the OP, who's trying to guess at what the OP wants. Bear this in mind, but I think he wants to know:

How can I remove the first two characters from a string, using jQuery?

+2  A: 

Assuming they want a substring of the original number:

var result = String(1234567891234).substr(2);
console.log(result); // Should be 34567891234
John Conde
A: 

A crossbrowser way:

(1234567891234).toString().slice(2);

robert