Time String to integer
string str="22:45";
string str1="";
for(int i=0;i<StringLen(str);i++)
if(StringSubstr(str,i,1)!=":")str1=StringConcatenate(str1,StringSubstr(str,i,1));
int number=StrToInteger(str1);
string str="22:45";
string str1="";
for(int i=0;i<StringLen(str);i++)
if(StringSubstr(str,i,1)!=":")str1=StringConcatenate(str1,StringSubstr(str,i,1));
int number=StrToInteger(str1);
You agree to website policy and terms of use
I have a time string like either :
"22:30"
"01:30"
"00:45"
And I want to turn it into an integer
2230
130
45
Is there an easy way to do this ??