# Convert string to number

**URL:** <https://forum.kirupa.com/t/convert-string-to-number/155553>\
**Category:** Uncategorized\
**Created:** [July 18, 2005, 8:34pm UTC](https://forum.kirupa.com/t/convert-string-to-number/155553 "2005-07-18T20:34:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crtvgrndwrks](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@crtvgrndwrks](https://forum.kirupa.com/u/crtvgrndwrks)\
**Post date:** [July 18, 2005, 8:34pm UTC](https://forum.kirupa.com/t/convert-string-to-number/155553/1 "2005-07-18T20:34:47Z")

</div>

is there a way to convert a string to a number? i have a number stored in an xml document and when i try to access it, it comes across as a string, or something thats not a number (it returns 0 when i trace the attribute, not NaN, so i’m not sure exactly what it’s doing).
