# How do i use a textfield input as a number?

**URL:** <https://forum.kirupa.com/t/how-do-i-use-a-textfield-input-as-a-number/276269>\
**Category:** Uncategorized\
**Created:** [November 25, 2008, 5:12am UTC](https://forum.kirupa.com/t/how-do-i-use-a-textfield-input-as-a-number/276269 "2008-11-25T05:12:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arosemena](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@arosemena](https://forum.kirupa.com/u/arosemena)\
**Post date:** [November 25, 2008, 5:12am UTC](https://forum.kirupa.com/t/how-do-i-use-a-textfield-input-as-a-number/276269/1 "2008-11-25T05:12:32Z")

</div>

i want to know how do i use a input in the textfield as a numeric value and not as text, for retrieving the text i would do

myvar = mytextfield.text

but if i want to retrieve the data as a operable number how can i do it?, i tried

myvar = mytextfield.int  
or  
myvar = mytextfield.number

either of them worked so i really need help with that thx =)
