View Full Version : compare decimal numbers (not for versions)

01-13-2009, 03:27 PM
Hello, I need to compare 2 dates in this format: YYYYMM.DD in InstallScript. First I tried comparing it just as real number, but there is no data type that supports real number.

At this point, how can I use StrGetTokens to take numbers before decimal and after decimal? Would VersionCompare work with this particular format?

Or any other suggestions?


01-13-2009, 03:37 PM
If the date strings will always contain leading zeroes ("2010.0101", never "2010.101"), can you just use string comparison with < or StrCompare?

02-09-2009, 06:09 PM
StrCompare worked, thank you!