LoginLogin

help with INPUT

Root / Programming Questions / [.]

MiopasidCreated:
How do I make it so that INPUT only accepts numbers?

Use a number variable instead of a string.

Is there a way so that INPUT can follow a certain format? Like how INPUT can only accept a XX/XX/XXXX or a XX:XX:XX format

There's no built-in way to do that, but you could do things like:
INPUT MONTH,DAY,YEAR
INPUT HOUR,MINUTE,SECOND
so the user needs to type: 11,15,2016 or 9,18,0 You could also use LINPUT and make a custom function or use the regex library to check what the user typed.