J
Jean-Paul De Winter
Hi,
How to get the number 800 out of the string 8:00
or 850 out of 8:30....
Thanks
How to get the number 800 out of the string 8:00
or 850 out of 8:30....
Thanks
Jean-Paul De Winter said:Hi,
How to get the number 800 out of the string 8:00
or 850 out of 8:30....
Thanks
Jean-Paul said:No it's not a typo...
The result of your code is a new string, not a number so it should be 830
instead of "830"
JP
Stuart said:Ok, so convert it to the data type you want, ie:
lngResult = Clng(Replace("8:30", ":", ""))
or
intResult = Cint(Replace("8:30", ":", ""))
etc.
(PS - how did you expect to get 850 from "8:30"?)
If 850 means 8.5 it's back to the drawing board.