
May 15th, 2000, 10:54 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 24
|
|
|
<i><b>Originally posted by : Tamer Abdelalim</b></i><br />if you are sure that the type is string<br />for an example if the time was entered to a variable called "VarTime"<br />vartime = "15:45"<br />then <br />varhours = Mid(vartime, InStr(1, vartime, ":"), Len(vartime))<br />or you can use "Left" function directly istead of "Mid",<br />and the number of charaters instead of "InStr" function if you want to hard code it.<br /><br />I hope that would help.<br /><br />Tamer<br />------------<br />chill at 5/12/2000 10:07:07 AM<br /><br />I have a string for example "15:45"<br />(it's a TIME that USER has just entered INPUT-ed)<br /><br />I want to know - how can I cut from it those 2 first numbers (Idea is to make sure if time is valid?) - and how can I convert it to Integer? cInt() - maybe works? <br /><br />But my problem is that - how can I take (cut) a piece of a string and haw can I use it then?<br /><br />OK I hope U understand - THANK U<br />
|