Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

Thread: Values of 8 and 9 are converting to 0?

1. Values of 8 and 9 are converting to 0?

I am working with comparing dates. The problem I am having is that August (08) comes AFTER July (07). However, it seemed to consider Aug (08) and Sep (09) to be earlier than Jan-Jul. When I took a look at the values, they were shown as...

July = "07"
August = "00"
September = "00"

Anyone know why this might happen? Is there a possible fix?

Any help is greatly appreciated. Thanks.

SnotRockit

• You should do a search for this very question. It has been answered twice in the recent past. One of those answers was last week.

The reason is because numbers prefaced with 0 are octal, and 08 and 09 are not valid octal values, so it chokes. You can fix this by doing Number('08') or whatever your variable is that stores '08' and you will get 8 back.

• SnotRockit: The answer to this question is in the FAQ.

If you want a more thorough explanation, see this textual explanation or this tabular breakdown.

•

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•