Advertisement

03.11.2008 at 01:59AM PDT, ID: 23231064
[x]
Attachment Details

Parsing error string to int

Asked by matthew016 in JavaScript

Hi,

I have months in the following format :
01, 02, 03, ..., 12

alert(month);
month = parseInt(month);
alert(month);

The follwing code returns for 01 => 1, 02 => 2, ...

But for some months it returns 0 ! Only in th case of 08 and 09

Why ?Start Free Trial
[+][-]03.11.2008 at 02:12AM PDT, ID: 21094011

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Sign Up Now!
Solution Provided By: pratima_mcs
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.11.2008 at 02:12AM PDT, ID: 21094014

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.11.2008 at 02:12AM PDT, ID: 21094016

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.11.2008 at 02:13AM PDT, ID: 21094020

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628