string variable to int

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
lipman
Posts: 3
Joined: May 25th, 2006, 11:34 am

Hi, i'm getting string variable (timecode time) from text file.
It's processed as a string. For example
var number1="008";
var number2="011";


How can I translate it to integer?
vidpat
Posts: 86
Joined: October 21st, 2004, 12:36 am
Location: Phoenix, AZ
Contact:

Try this:

Code: Select all

var number1 = "008";

var integer1 = parseInt(number1);
lipman
Posts: 3
Joined: May 25th, 2006, 11:34 am

That's it!
Post Reply