vb.net - VB - Convert long String-number to Integer -
alright, i'm not oriented when comes functions aviable in vb. have string containing current date , time , need convert integer can compare time.
dim my_str string = "201308281110" dim my_int integer = convert.toint32(my_str)
i cant string apparently. because think long 32-bit integer. other convertions have tried fails. including "toint64", "int", "cint"... so, idea how convert longer string integer?
why don't use date
? can compare dates
each other, there's no need use integer comparing.
dim my_date date = datetime.parseexact(my_str, "yyyymmddhhmm", system.globalization.cultureinfo.invariantculture)
Comments
Post a Comment